{"id":37686612,"url":"https://github.com/razor-1/localizer","last_synced_at":"2026-02-24T23:11:24.894Z","repository":{"id":37263052,"uuid":"286144433","full_name":"razor-1/localizer","owner":"razor-1","description":"Go localization framework","archived":false,"fork":false,"pushed_at":"2026-01-31T17:50:49.000Z","size":1256,"stargazers_count":31,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-01T05:36:51.598Z","etag":null,"topics":["cldr","go","golang","i18n","l10n","localization","translations"],"latest_commit_sha":null,"homepage":"","language":"Go","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/razor-1.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-08-09T01:08:12.000Z","updated_at":"2026-01-31T17:23:21.000Z","dependencies_parsed_at":"2023-02-02T23:16:20.300Z","dependency_job_id":"5fba18e3-0999-4646-b641-8a4d30967966","html_url":"https://github.com/razor-1/localizer","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/razor-1/localizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razor-1%2Flocalizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razor-1%2Flocalizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razor-1%2Flocalizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razor-1%2Flocalizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/razor-1","download_url":"https://codeload.github.com/razor-1/localizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/razor-1%2Flocalizer/sbom","scorecard":{"id":69354,"data":{"date":"2025-08-04","repo":{"name":"github.com/razor-1/localizer","commit":"6380ced6c1d2e045046d8f40867c8067396740ad"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3.8,"checks":[{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/razor-1/localizer/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/razor-1/localizer/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/razor-1/localizer/lint.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yaml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/razor-1/localizer/lint.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/razor-1/localizer/lint.yaml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Warn: no topLevel permission defined: .github/workflows/lint.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/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/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T03:27:58.929Z","repository_id":37263052,"created_at":"2025-08-15T03:27:58.929Z","updated_at":"2025-08-15T03:27:58.929Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29804386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"ssl_error","status_checked_at":"2026-02-24T22:43:18.536Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["cldr","go","golang","i18n","l10n","localization","translations"],"created_at":"2026-01-16T12:34:29.946Z","updated_at":"2026-02-24T23:11:24.878Z","avatar_url":"https://github.com/razor-1.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Localizer: convenient localization for Go\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/razor-1/localizer/build.yaml?style=flat-square)](https://github.com/razor-1/localizer/actions?query=workflow%3ABuild)\n[![Go Report Card](https://goreportcard.com/badge/github.com/razor-1/localizer?style=flat-square)](https://goreportcard.com/report/github.com/razor-1/localizer)\n![Go Version](https://img.shields.io/badge/go%20version-%3E=1.15-61CFDD.svg?style=flat-square)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/razor-1/localizer)](https://pkg.go.dev/github.com/razor-1/localizer)\n\nLocalizer intends to make it easy for you to work with locales in Go. It was inspired by \nmany good tools that came before it, such as:\n* [Babel](http://babel.pocoo.org/) for Python\n* [go-i18n](https://github.com/nicksnyder/go-i18n) \n* [cldr](https://github.com/theplant/cldr)\n\nI couldn't find one Go package that did everything, so I took the best of what was out there, made some\nimprovements \u0026 tweaks, and put them together into localizer. I also wanted to leverage golang.org/x/text/language \nas much as possible, since it takes care of some difficult tasks. \n\n## Getting Started: Example\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"time\"\n\n    \"golang.org/x/text/language\"\n\n    \"github.com/razor-1/localizer\"\n    \"github.com/razor-1/localizer-cldr/resources/currency\"\n)\n\nfunc main() {\n    l, err := localizer.NewLocale(language.Spanish)\n    if err != nil {\n        panic(err)\n    }\n\n    jan2020 := time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)\n    month, err := l.Calendar.Format(jan2020, \"MMMM\")\n    if err != nil {\n        panic(err)\n    }\n\n    fmt.Println(month) // \"enero\"\n    fmt.Println(l.Calendar.FormatNames.Months.Wide.Jan) // \"enero\"\n    fmt.Println(l.FmtNumber(10000.12)) // \"10.000,12\"\n    cur, err := l.FmtCurrency(currency.USD, 10000.12)\n    if err != nil {\n        panic(err)\n    }\n\n    fmt.Println(cur) // \"10.000,12 US$\"\n}\n```\n\nAs you can see, the locale object makes it easy to interact with CLDR data. What about translated strings?\n```go\ngotl := gotext.NewLocale(\"translations\", \"es\")\ngotl.AddDomain(\"messages\")\n\ngtstore := gotextstore.GetTranslationStore(gotl)\nl, err := localizer.NewLocaleWithStore(language.Spanish, gtstore)\nif err != nil {\n    panic(err)\n}\n\nfmt.Println(l.Get(\"form.button.login\")) //\"Iniciar sesión\"\nfmt.Println(l.GetPlural(\"%d hours\", 1, 1)) //\"1 hora\"\nfmt.Println(l.GetPlural(\"%d hours\", 2, 2)) //\"2 horas\"\n```\n\nYou can use any package which implements the `localizer/store.TranslationStore` interface to load translations. The above\nexample uses a helper package, localizer/gotextstore, which integrates with [gotext](https://github.com/leonelquinteros/gotext) to\nprovide gettext po/mo support for localizer. If other packages implement this interface, support for xliff, xmb, and \nother common formats can be added. You can also easily implement it for your own custom store.\n\nlocalizer also exposes a [message](https://godoc.org/golang.org/x/text/message) printer if you'd like to use it. \nJust call `l.NewPrinter()` and you can then call `Printf()` and other methods on it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazor-1%2Flocalizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frazor-1%2Flocalizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frazor-1%2Flocalizer/lists"}