This is the Internationalization project for Open
Happy translating!
- Add this extension to your Gemfile with this line:
gem 'open_i18n', github: '99cm/open_i18n'
- Install the gem using Bundler:
bundle install
- Copy & run migrations
bundle exec rails g open_i18n:install
- Restart your server
If your server was running, restart it so that it can find the assets properly.
We currently support the following locales by default. If you need a locale that is not in the list you can add a custom translation file into your application by following the Rails translations guide.
If you want to improve the translations on your language, run the tasks:
bundle exec rake open_i18n:update_default
bundle exec i18n-tasks add-missing --nil-value --locale <LOCALE>
Substitute with your locale code (e.g: it
).
This will do a cleanup and prepare <LOCALE>.yml
with all the missing keys.
You can then write the translations and open a pull request.
We moved support for translating models into a separate Gem
Please update your Gemfile
if you still need the model translations.
# Gemfile
gem 'open_globalize', github: '99cm/open_globalize', branch: 'master'
Copyright (c) 2019 Leo Wang and other contributors. released under the New BSD License