I have i18n file
en.js
{
hello: "Hello
}
....
app.js
I18n.t('hello')
In rails you can pass variables like
en.js
{
hello: "Hello, %name"
}
....
app.js
I18n.t('hello', name: 'SomeDude')
Output:
Hello SomeDude
Is there any way I can do this in react native? I have tried I18n.t('hello',{ name: 'SomeDude' }) but this is not working :/.
Thanks in advance!
NVM, instead of doing %name, documentation says it must be do as {{name}}
thanks @JulioOrellana this should be documented in the README file
Most helpful comment
NVM, instead of doing
%name, documentation says it must be do as{{name}}