The localedata
gem provides a command line interface for the Ruby on Rails translation management platform LocaleData on https://www.localedata.com.
Add this line to your application's Gemfile:
gem "localedata", group: :development
Execute the following command:
$ bundle install
Or install it yourself as:
$ gem install localedata
Finally, create the default configuration file:
$ bundle exec localedata install
You need to configure your access token on your development machine. Add the folowing line into your .bashrc
(or .zshrc
) file:
export LOCALEDATA_ACCESS_TOKEN="YOUR-SECRET-ACCESS-TOKEN"
You can edit the configuration in config/localedata.yml
:
projects:
- id: "YOUR-PROJECT-ID"
locales:
en: "config/locales/en.yml"
sk: "config/locales/sk.yml"
You can find the project ID and your access token on your LocaleData project page.
localedata pull # downloads all your locales
localedata pull en de # downloads only the en and de locales
Bug reports and pull requests are welcome on GitHub at https://github.com/localedata/localedata-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the LocaleData Client project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.