-
Notifications
You must be signed in to change notification settings - Fork 25
Do you want to translate Diversity Tickets to your own language? Here are some indications:
Do you want to translate Diversity Tickets App to your own language? That's great! Having new languages will improve more under represented people in Tech to access to the information about conferences and different tickets and fundings they can afford through the web app. So thank you for the effort!
Our App uses the I18n gem from Sven Fuchs which is already integrated in Rails, so it works with different locales that are stored in a yml file. There is one yml file for each language so is clean and easy to create translations. In order to identify the different languages, Rails (I18n) uses the language code from ISO 639.
If you want to translate the app you should create a new yml file in the config/locales file to add all your translations. In order to add all the translations from the app, you will need to add all the keys already created so we recommend to copy config/locales/en.yml file and start translating from there. Also usually, the en.yml is the most updated one and has all the keys that are localized in our app.
In order to tell the app that you have a new translation, you should also add it to I18n.available_locales. You can find this in config/application.rb. You should only add your language to the array. For example, if the language you are adding is french, you should add :fr to the array.
I18n.available_locales = [:en, :es, :fr]
That's it! Not that difficult isn't it? Have fun translating!