{"id":37115116,"url":"https://github.com/phillippbertram/langly","last_synced_at":"2026-01-14T13:31:24.589Z","repository":{"id":304812420,"uuid":"801441443","full_name":"phillippbertram/langly","owner":"phillippbertram","description":"CLI Tool that generates platform specific translation files for Android (xml) \u0026 iOS (Localizable.strings) from shared .arb files","archived":false,"fork":false,"pushed_at":"2024-05-28T12:35:21.000Z","size":2879,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-15T22:20:52.389Z","etag":null,"topics":["android","arb","cli","cross-platform","ios","language","localizable-strings","localization","translation","xcode"],"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/phillippbertram.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}},"created_at":"2024-05-16T08:33:42.000Z","updated_at":"2025-04-17T11:30:46.000Z","dependencies_parsed_at":"2025-07-16T00:08:33.245Z","dependency_job_id":"73389835-c13a-48fe-a286-7849b96763b7","html_url":"https://github.com/phillippbertram/langly","commit_stats":null,"previous_names":["phillippbertram/langly"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/phillippbertram/langly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Flangly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Flangly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Flangly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Flangly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phillippbertram","download_url":"https://codeload.github.com/phillippbertram/langly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillippbertram%2Flangly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28421218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"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":["android","arb","cli","cross-platform","ios","language","localizable-strings","localization","translation","xcode"],"created_at":"2026-01-14T13:31:23.781Z","updated_at":"2026-01-14T13:31:24.581Z","avatar_url":"https://github.com/phillippbertram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# langly\n\n`langly` is a command-line tool written in Go for converting `.arb` files (used in Flutter for localization) into platform-specific formats for iOS and Android. The tool generates `Localizable.strings` and `Localizable.stringsdict` files for iOS, and `strings.xml` files for Android, allowing translations to be managed and utilized in native mobile app projects.\n\n## Features\n\n- Convert `.arb` files to iOS `Localizable.strings`\n- Convert `.arb` files to iOS `Localizable.stringsdict` (in `plist` format) for handling plurals\n- Convert `.arb` files to Android `strings.xml`\n\n## Installation\n\nTo install the tool, you need to have Go installed on your machine. Clone the repository and build the binary:\n\n```sh\ngit clone https://github.com/phillippbertram/langly.git\ncd langly\ngo build -o langly\n```\n\n## Usage\n\n### Convert .arb file to iOS format\nTo convert an `.arb` file to iOS `Localizable.strings` and `Localizable.stringsdict` files:\n\n```sh\n./langly ios examples/arb -o ./examples/ios/langly/langly/Localizations\n```\n\n### Convert .arb file to Android format\nTo convert an `.arb` file to Android `strings.xml` file:\n\n```sh\n./langly android examples/arb -o ./examples/android/app/src/main/res\n```\n\n## Example\n\nGiven an `.arb` file `example_en.arb`:\n\n```json\n{\n    \"@@locale\": \"en\",\n    \"app_title\": \"Fast Shopping\",\n    \"@app_title\": {\n        \"description\": \"Shown on top of the screen.\"\n    },\n    \"list_item_no_name\": \"No name\",\n    \"@list_item_no_name\": {\n        \"description\": \"When the item has no/empty name.\"\n    },\n    \"list_item_done_ago\": \"done {when}\",\n    \"@list_item_done_ago\": {\n        \"description\": \"Small caps date when item was marked as done.\",\n        \"placeholders\": {\n            \"when\": {\n                \"type\": \"String\",\n                \"example\": \"a minute ago\"\n            }\n        }\n    },\n    \"delete_shopping_list_dialog_body\": \"Do you really want to delete {list_name} shopping list? This operation cannot be undone.\",\n    \"@delete_shopping_list_dialog_body\": {\n        \"placeholders\": {\n            \"list_name\": {\n                \"type\": \"String\",\n                \"example\": \"Groceries\"\n            }\n        }\n    },\n    \"nWombats\": \"{count, plural, =0{no wombats} =1{1 wombat} other{{count} wombats}}\",\n    \"@nWombats\": {\n        \"description\": \"A plural message\",\n        \"placeholders\": {\n            \"count\": {\n                \"type\": \"Int\"\n            }\n        }\n    },\n    \"pageHomeInboxCount\": \"{number, plural, zero{You have no new messages} one{You have 1 new message} other{You have {number} new messages}}\",\n    \"@pageHomeInboxCount\": {\n        \"description\": \"New messages number on the Home screen\",\n        \"placeholders\": {\n            \"number\": {}\n        }\n    }\n}\n```\n\nRunning the tool for iOS:\n\n```sh\n./langly ios ./arb -o ./output\n```\n\nThis generates `Localizable.strings`:\n\n```plaintext\n\"app_title\"=\"Fast Shopping\";\n\"delete_shopping_list_dialog_body\"=\"Do you really want to delete %@ shopping list? This operation cannot be undone.\";\n\"list_item_done_ago\"=\"done %@\";\n\"list_item_no_name\"=\"No name\";\n```\n\nand `Localizable.stringsdict` in the specified output directory:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n    \u003cdict\u003e\n        \u003ckey\u003enWombats\u003c/key\u003e\n        \u003cdict\u003e\n            \u003ckey\u003eNSStringLocalizedFormatKey\u003c/key\u003e\n            \u003cstring\u003e%#@count@\u003c/string\u003e\n            \u003ckey\u003ecount\u003c/key\u003e\n            \u003cdict\u003e\n                \u003ckey\u003eNSStringFormatSpecTypeKey\u003c/key\u003e\n                \u003cstring\u003eNSStringPluralRuleType\u003c/string\u003e\n                \u003ckey\u003eNSStringFormatValueTypeKey\u003c/key\u003e\n                \u003cstring\u003ed\u003c/string\u003e\n                \u003ckey\u003eone\u003c/key\u003e\n                \u003cstring\u003e1 wombat\u003c/string\u003e\n                \u003ckey\u003eother\u003c/key\u003e\n                \u003cstring\u003e%d wombats\u003c/string\u003e\n                \u003ckey\u003ezero\u003c/key\u003e\n                \u003cstring\u003eno wombats\u003c/string\u003e\n            \u003c/dict\u003e\n        \u003c/dict\u003e\n        \u003ckey\u003epageHomeInboxCount\u003c/key\u003e\n        \u003cdict\u003e\n            \u003ckey\u003eNSStringLocalizedFormatKey\u003c/key\u003e\n            \u003cstring\u003e%#@number@\u003c/string\u003e\n            \u003ckey\u003enumber\u003c/key\u003e\n            \u003cdict\u003e\n                \u003ckey\u003eNSStringFormatSpecTypeKey\u003c/key\u003e\n                \u003cstring\u003eNSStringPluralRuleType\u003c/string\u003e\n                \u003ckey\u003eNSStringFormatValueTypeKey\u003c/key\u003e\n                \u003cstring\u003ed\u003c/string\u003e\n                \u003ckey\u003eother\u003c/key\u003e\n                \u003cstring\u003eYou have %d new messages\u003c/string\u003e\n            \u003c/dict\u003e\n        \u003c/dict\u003e\n    \u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n\nRunning the tool for Android:\n\n```sh\n./langly android ./arb -o ./output\n```\n\nThis generates `strings.xml` in the specified output directory.\n```xml\n\u003cresources\u003e\n    \u003cstring name=\"app_title\"\u003eFast Shopping\u003c/string\u003e\n    \u003cstring name=\"delete_shopping_list_dialog_body\"\u003eDo you really want to delete %s shopping list? This operation cannot be undone.\u003c/string\u003e\n    \u003cstring name=\"list_item_done_ago\"\u003edone %s\u003c/string\u003e\n    \u003cstring name=\"list_item_no_name\"\u003eNo name\u003c/string\u003e\n    \u003cplurals name=\"nWombats\"\u003e\n        \u003citem quantity=\"other\"\u003e%d wombats\u003c/item\u003e\n        \u003citem quantity=\"zero\"\u003eno wombats\u003c/item\u003e\n        \u003citem quantity=\"one\"\u003e1 wombat\u003c/item\u003e\n    \u003c/plurals\u003e\n    \u003cplurals name=\"pageHomeInboxCount\"\u003e\n        \u003citem quantity=\"other\"\u003eYou have %d new messages\u003c/item\u003e\n    \u003c/plurals\u003e\n\u003c/resources\u003e\n```\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request for any bugs or features.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillippbertram%2Flangly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphillippbertram%2Flangly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillippbertram%2Flangly/lists"}