{"id":16802162,"url":"https://github.com/kamikazechaser/locale","last_synced_at":"2025-10-30T15:15:59.274Z","repository":{"id":219073644,"uuid":"658595112","full_name":"kamikazechaser/locale","owner":"kamikazechaser","description":"Simple locale template rendering using KV maps only","archived":false,"fork":false,"pushed_at":"2024-01-25T09:36:36.000Z","size":9,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T00:58:00.068Z","etag":null,"topics":["i10n","i18n","internationalization","localization","translation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamikazechaser.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}},"created_at":"2023-06-26T05:54:05.000Z","updated_at":"2024-05-12T16:27:27.000Z","dependencies_parsed_at":"2024-01-25T11:12:57.740Z","dependency_job_id":null,"html_url":"https://github.com/kamikazechaser/locale","commit_stats":null,"previous_names":["kamikazechaser/locale"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kamikazechaser/locale","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamikazechaser%2Flocale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamikazechaser%2Flocale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamikazechaser%2Flocale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamikazechaser%2Flocale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamikazechaser","download_url":"https://codeload.github.com/kamikazechaser/locale/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamikazechaser%2Flocale/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278973459,"owners_count":26078233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["i10n","i18n","internationalization","localization","translation"],"created_at":"2024-10-13T09:38:51.238Z","updated_at":"2025-10-08T16:12:02.889Z","avatar_url":"https://github.com/kamikazechaser.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# locale\n\n\u003e Simple locale template rendering using KV maps only\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/kamikazechaser/locale.svg)](https://pkg.go.dev/github.com/kamikazechaser/locale)\n\nProvides a _simple_ and _flexible_ way to render your translations. You are not locked into any i18n/i10n standard.\n\n## Install:\n\n`go get github.com/kamikazechaser/locale`\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/kamikazechaser/locale\"\n)\n\nfunc main() {\n\tlMap := locale.LangMap{\n\t\t\"eng\": locale.Map{\n\t\t\t\"hello\": \"Hello {{ .Name }}\",\n\t\t},\n\t\t\"swa\": locale.Map{\n\t\t\t\"hello\": \"Habari {{ .Name }}\",\n\t\t},\n\t}\n\n\tl, err := locale.NewLocale(lMap, \"eng\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tpayload := struct {\n\t\tName string\n\t}{\n\t\t\"Mohamed Sohail\",\n\t}\n\n\t// Will use the default language here.\n\teR, err := l.Render(\"hello\", locale.WithPayload(payload))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Using all available Render optional function options.\n\tsR, err := l.Render(\"hello\", locale.WithLangCode(\"swa\"), locale.WithPayload(payload))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Println(eR)\n\tlog.Println(sR)\n}\n\n```\n\nFor more info, See the Go package reference.\n\n## License\n\nThe Unlicense.\n\n## Credits\n\n- Some of the API inspired by https://github.com/kataras/i18n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamikazechaser%2Flocale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamikazechaser%2Flocale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamikazechaser%2Flocale/lists"}