{"id":43081209,"url":"https://github.com/opdev1004/op-i18n","last_synced_at":"2026-01-31T14:35:22.780Z","repository":{"id":57314966,"uuid":"337595742","full_name":"opdev1004/op-i18n","owner":"opdev1004","description":"Easy Node.js i18n with json locale file storage. No fancy grammar.","archived":false,"fork":false,"pushed_at":"2023-08-01T16:52:38.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-15T04:27:06.912Z","etag":null,"topics":["electron","hacktoberfest","i18n","internationalisation","internationalization","language","locale","localisation","localise","localization","localize","node-js","nodejs","translate","translation"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/op-i18n","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opdev1004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-10T02:31:27.000Z","updated_at":"2021-10-14T01:24:33.000Z","dependencies_parsed_at":"2024-11-15T05:32:57.173Z","dependency_job_id":null,"html_url":"https://github.com/opdev1004/op-i18n","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opdev1004/op-i18n","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opdev1004%2Fop-i18n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opdev1004%2Fop-i18n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opdev1004%2Fop-i18n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opdev1004%2Fop-i18n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opdev1004","download_url":"https://codeload.github.com/opdev1004/op-i18n/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opdev1004%2Fop-i18n/sbom","scorecard":{"id":708206,"data":{"date":"2025-08-11","repo":{"name":"github.com/opdev1004/op-i18n","commit":"48c9deaa4df268e218259511071326c92ddc27f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/3 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T07:21:11.747Z","repository_id":57314966,"created_at":"2025-08-22T07:21:11.747Z","updated_at":"2025-08-22T07:21:11.747Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28945823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T14:26:55.697Z","status":"ssl_error","status_checked_at":"2026-01-31T14:26:52.545Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","hacktoberfest","i18n","internationalisation","internationalization","language","locale","localisation","localise","localization","localize","node-js","nodejs","translate","translation"],"created_at":"2026-01-31T14:35:22.643Z","updated_at":"2026-01-31T14:35:22.774Z","avatar_url":"https://github.com/opdev1004.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✨ OP i18n (op-i18n) ✨\nEasy Node.js i18n with json locale file storage. No fancy grammar.\n\n## 📢 Notice\nThis repository is no longer maintained. Because I am going to work on totally new internationalization module with tot file format.\nI found JSON is not good when we handle a huge data. And we cannot obtain partial data as well. I found many delays from my softwares.\nI would not remove module so you can still use it however there won't be any update as I will create something better.\n\n## ▶️ install\n```\nnpm i op-i18n\n```\n\n## 👩‍🎓 Tutorial\n### Most of Case\n- en_US.json\n```\n{\n    \"name\": \"Victor\"\n}\n```\n- ko_KR.json\n```\n{\n    \"name\": \"빅터\"\n}\n```\n- index.js\n```\nconst path = require('path');\nconst I18n = require('op-i18n');\n\n// Note that '_' is used instead of '-' for key in options below.\n// eg. ko-KR:{} (X), ko_KR:{} (O)\nconst options =\n{\n  locales:\n  {\n      ko_KR:\n      {\n        name: '한국어',\n        iso: 'ko-KR',\n        file: 'ko_KR.json'\n      },\n      en_US:\n      {\n        name: 'English',\n        iso: 'en-US',\n        file: 'en_US.json'\n      }\n  },\n  directory: path.resolve(__dirname, 'locales/'),\n  defaultLocale: 'en_US',\n}\n\nconst i18n = new I18n(options);\n\n// Change locale to Korean\ni18n.updateDefaultLocale(\"ko_KR\");\nconsole.log(i18n.$t());\n// output: { name: '빅터' }\nconsole.log(i18n.$t(\"name\"));\n// output: 빅터\nconsole.log(i18n.$t(\"name\", \"en_US\"));\n// output: Victor\n```\n\n### Options\nRequires locales, directory, defaultLocale in options. Note that _ is used instead of - for key in options.\n\njs key | O/X \n-------|-----\nko_KR  | O 😇\nko-KR  | X ☠️\n\n```\nconst path = require('path');\nconst I18n = require('op-i18n');\n\n// Note that '_' is used instead of '-' for key in options below.\n// eg. ko-KR:{} (X), ko_KR:{} (O)\nconst options =\n{\n  locales:\n  {\n      ko_KR:\n      {\n        name: '한국어',\n        iso: 'ko-KR',\n        file: 'ko_KR.json'\n      },\n      en_US:\n      {\n        name: 'English',\n        iso: 'en-US',\n        file: 'en_US.json'\n      }\n  },\n  directory: path.resolve(__dirname, 'locales/'),\n  defaultLocale: 'en_US',\n}\n\nconst i18n = new I18n(options);\n```\n\n### Advanced $t()\n\n#### Regular\nYou can use . notation just like how you get value out of js object:\n- ko_KR.json\n```\n{\n    \"name\":\n    {\n        \"first\": \"빅터\"\n        \"last\": \"박\"\n    }\n}\n```\n- en_US.json\n```\n{\n    \"name\":\n    {\n        \"first\": \"Victor\"\n        \"last\": \"Park\"\n    }\n}\n```\n- index.js\n```\nconst path = require('path');\nconst I18n = require('op-i18n');\n\n// Note that '_' is used instead of '-' for key in options below.\n// eg. ko-KR:{} (X), ko_KR:{} (O)\nconst options =\n{\n  locales:\n  {\n      ko_KR:\n      {\n        name: '한국어',\n        iso: 'ko-KR',\n        file: 'ko_KR.json'\n      },\n      en_US:\n      {\n        name: 'English',\n        iso: 'en-US',\n        file: 'en_US.json'\n      }\n  },\n  directory: path.resolve(__dirname, 'locales/'),\n  defaultLocale: 'en_US',\n}\n\nconst i18n = new I18n(options);\n\nconsole.log(i18n.$t(\"name.first\"));\n//output: Victor\n```\nFor getting value from specified locale:\n```\nconsole.log(i18n.$t(\"name.first\", \"ko_KR\"));\n//output: 빅터\n```\nYou can get whole js object with empty key \"\".\n```\nconsole.log(i18n.$t(\"\"));\n//output: { name: { first: \"Victor\", last: \"Park\" } }\nconsole.log(i18n.$t(\"\", \"ko_KR\"));\n//output: { name: { first: \"빅터\", last: \"박\" } }\n```\n#### Using Object\nYou can use object to get translation as well. { locale: \"\", key: \"\" }.\n```\nconsole.log(i18n.$t( { key:\"name.first\" } ));\n//output: Victor\nconsole.log(i18n.$t( { locale: \"ko_KR\", key:\"name.first\" } ));\n//output: 빅터\n```\n\n## 📖 op-i18n Document\n### .$t()\n```\nreturn default translation in js object. Uses .getDefaultTranslation()\n```\n### .$t(string:key)\n```\nreturn value according to key from default translation in js object\n```\n### .$t(object:{ key: string:key, locale: string:locale })\n```\nreturn value according to key and locale in object.\n```\n### .$t(string:key, string:locale key)\n```\nreturn value according to key from translation of specified locale in js object\n```\n### .updateDefaultLocale(string:locale key)\n```\nupdate default locale and default translation according to specified locale\n```\n### .updateDefaultLocaleByName(string:name)\n```\nupdate default locale and default translation according to specified name\n```\n### .getDefaultTranslation()\n```\nreturn default translation in js object\n```\n### .getNames()\n```\nreturn list of locale name\n```\n### .getISOs()\n```\nreturn list of locale ISO\n```\n### .getDefaultName()\n```\nreturn name of default locale in js object. eg) 한국어\n```\n### .getDefaultISO()\n```\nreturn ISO of default locale in js object. eg) ko-KR\n```\n\n## 👨‍💻 Author\n[Victor Chanil Park](https://github.com/opdev1004)\n\n## 💯 License\nMIT, See [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopdev1004%2Fop-i18n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopdev1004%2Fop-i18n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopdev1004%2Fop-i18n/lists"}