-
Notifications
You must be signed in to change notification settings - Fork 257
Adding translations for a new language
In order to support a new language there are 2 key files that need to be translated. The first is the "locale.yml" file here: https://github.com/etewiah/property_web_builder/tree/master/config/locales
So in the case of adding support for Romanian, I will need a "ro.yml" file there with the correct translations.
I will also need a translation of this file: https://github.com/etewiah/property_web_builder/blob/master/db/seeds/translations_en.rb
There are 2 other files per local in the "config/locales" folder that may need to be translated as well. The first begins with "rails." and the other with "devise.".
These 2 files are for the texts that come with the Rails framework and the Devise gem. For the first file there is a version of it for most languages here: https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale Translations for the second file can be found here: https://github.com/tigrish/devise-i18n/tree/master/rails/locales
If the translations for those 2 files are available at the locations I've mentioned above then simply copy them. If not I will need them to be translated too.
With translations for the above files available, I will be able to enable support for that language for the public pages of PropertyWebBuilder. To add support in the admin pages there is one other file that will need translation:
https://github.com/etewiah/property_web_builder/blob/master/config/locales/admin.en.yml
Finally, if you wish to contribute some example content in the new language this is the file that needs translation: