-
Notifications
You must be signed in to change notification settings - Fork 15
Internationalization
If you're interested in helping us translate our app to your language or a language you know, please check if there's any open issue for it. If not, be free to add one yourself! 😉
IMPORTANT NOTE: Currently, the most updated locale strings are located in the translations
branch and you should open up a Pull Request for that branch. If you don't know how to do that, you can check this page on our wiki or contact us.
RoR use I18n, is easy to configure, we just add the string in the .yml of the language.
The .yml of each language are in config/locales/
, there can be added all the .yml as [language_code].yml
you can see here the code of all the languages.
We encapsulate the values by HTML elements such as cats, users, sufferings etc. in the second level of the hierarchy.
For example:
es:
[...]
cats:
birthDate: 'Nacido aproximadamente el'
gender: 'Género:'
sterilized: 'Esterilizado:'
abandonedDate: 'Abandonado aproximadamente el'
document: 'Documento:'
We just need to add a line like this in our HTML file <%= I18n.t 'cats.sterilized'%>
, this line will show Esterilizado:
Our es.yml: https://github.com/infusionvlc/ConexionFelina/blob/master/config/locales/es.yml
Example: https://github.com/infusionvlc/ConexionFelina/blob/master/app/views/cats/index.html.erb
Language codes: https://es.wikipedia.org/wiki/ISO_639-1