{"id":22052646,"url":"https://github.com/ftp27/loco_strings","last_synced_at":"2026-02-09T16:02:47.670Z","repository":{"id":160692993,"uuid":"635529152","full_name":"ftp27/loco_strings","owner":"ftp27","description":"LocoStrings is a Ruby gem that provides a simple way to load and manipulate localization strings in iOS and Android projects","archived":false,"fork":false,"pushed_at":"2025-01-26T23:53:27.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-14T12:27:12.034Z","etag":null,"topics":["android","ios","library","localization"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ftp27.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-05-02T22:25:30.000Z","updated_at":"2025-01-26T23:53:31.000Z","dependencies_parsed_at":"2025-01-27T00:22:44.126Z","dependency_job_id":"cffb9514-ac0c-4ea3-838f-ff970a9b9b97","html_url":"https://github.com/ftp27/loco_strings","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ftp27/loco_strings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftp27%2Floco_strings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftp27%2Floco_strings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftp27%2Floco_strings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftp27%2Floco_strings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftp27","download_url":"https://codeload.github.com/ftp27/loco_strings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftp27%2Floco_strings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29271858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T13:47:44.167Z","status":"ssl_error","status_checked_at":"2026-02-09T13:47:43.721Z","response_time":56,"last_error":"SSL_read: 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","ios","library","localization"],"created_at":"2024-11-30T15:13:45.961Z","updated_at":"2026-02-09T16:02:47.479Z","avatar_url":"https://github.com/ftp27.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LocoStrings\n\n[![Gem Version](https://badge.fury.io/rb/loco_strings.svg)](https://badge.fury.io/rb/loco_strings)\n\nLocoStrings is a Ruby gem that provides utilities for working with localization strings in iOS and Android applications.\n\nIf you're an iOS or Android developer, you know how important it is to properly localize your apps for different languages and regions. However, managing localization files can be a tedious and error-prone task, especially as your app grows and supports more languages.\n\nThat's where LocoStrings comes in. With LocoStrings, you can easily parse and manipulate localization strings in both iOS `.strings` and Android `strings.xml` formats, allowing you to automate common localization tasks and ensure the accuracy and consistency of your translations.\n\nIn this README, we'll show you how to install and use LocoStrings in your Ruby projects. Let's get started!\n\n### Supported formats\n\nHere is the list of currently supported files, as well as files that are still on the to-do list. I am still working on the library, and I hope to eventually finish all the files on the list. Contributions are welcome.\n\n- [x] Android Resources\n- [x] Apple Strings\n- [ ] Gettext\n- [ ] Java Properties\n- [ ] Apple XLIFF\n- [ ] Objective-C/Cocoa Properties\n- [ ] .NET Resources\n- [ ] JavaScript Object\n- [ ] React Native (I18n library)\n- [ ] Symphony PHP XLIFF\n- [ ] Angular i18n XLIFF\n- [ ] Ruby YAML\n- [ ] Salesforce Translation\n- [ ] QT Linguist\n- [ ] Docx\n- [ ] Flutter ARB file\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add loco_strings\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install loco_strings\n\n## Usage\n\nLocoStrings is a Ruby gem that can be used to manage and manipulate strings in iOS and Android applications. It supports two file formats: iOS strings files and Android XML files. The gem provides a simple and intuitive API to read, write, update, and delete strings.\n\nTo use the gem in your project, you can install it by adding the following line to your Gemfile:\n\n```ruby\ngem 'loco_strings'\n```\n\nThen, run `bundle install` to install the gem.\n\nAfter installing the gem, you can use the `load` method to load a strings file. The method takes one argument, which is the path to the strings file.\n\n```ruby\nstrings = LocoStrings.load(\"path/to/strings/file\")\n```\n\nYou can then use the `read` method to read the strings from the file. The method returns a hash where the keys are the string keys and the values are instances of the `LocoString` class.\n\n```ruby\nstrings_hash = strings.read\n```\n\nYou can access the values in the hash using the keys.\n\n```ruby\nvalue = strings_hash[\"key\"]\n```\n\nYou can update a string by using the `update` method. The method takes two or three arguments: the key, the new value, and optionally a new comment.\n\n```ruby\nstrings.update(\"key\", \"new value\", \"new comment\")\n```\n\nYou can delete a string by using the `delete` method. The method takes one argument, which is the key.\n\n```ruby\nstrings.delete(\"key\")\n```\n\nYou can write the changes back to the file using the `write` method.\n\n```ruby\nstrings.write\n```\n\nLocoStrings supports two file formats: iOS strings files and Android XML files. When you load a file, LocoStrings automatically detects the file format and returns an instance of the appropriate class: `IosFile` or `AndroidFile`.\n\nHere is an example of how to use LocoStrings to manage an iOS strings file:\n\n```ruby\nstrings = LocoStrings.load(\"path/to/Localizable.strings\")\n# Read the strings\nstrings_hash = strings.read\n# Update a string\nstrings.update(\"key\", \"new value\")\n# Delete a string\nstrings.delete(\"key\")\n# Write the changes back to the file\nstrings.write\n```\n\nAnd here is an example of how to use LocoStrings to manage an Android XML file:\n\n```ruby\nstrings = LocoStrings.load(\"path/to/strings.xml\")\n# Read the strings\nstrings_hash = strings.read\n# Update a string\nstrings.update(\"key\", \"new value\")\n# Delete a string\nstrings.delete(\"key\")\n# Write the changes back to the file\nstrings.write\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [https://github.com/ftp27/loco_strings](). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ftp27/loco_strings/blob/master/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the LocoStrings project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ftp27/loco_strings/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftp27%2Floco_strings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftp27%2Floco_strings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftp27%2Floco_strings/lists"}