Page 1 of 1
Translating placeholder using i18next
Posted: Sun May 11, 2014 8:07 pm
by Doo Dad
Im using the i18next plugin to provide translation for my webapps ... I went throught he turtorial no problem mostly I get it .. except not sure how I can translate the placheholder values in my input fields .... any ideas ?
Thanks
DD
Translating placeholder using i18next
Posted: Sun May 11, 2014 8:23 pm
by Igor
Hello,
Using below link you could find example with placeholder
http://i18next.com/pages/sample.html
Translating placeholder using i18next
Posted: Sun May 11, 2014 8:49 pm
by Doo Dad
Hi Igor ..
I changed the marker for the input element and it renders as below .. the basic i18next javascript is running since it translates the header of the page fine ..... but it does not translate the placeholder of the input element ... here the placeholder attribute is there and empty since in the form, I left it blank in this case (i tried it with some text as well and same result) in my translate.json I have :
"input.username":"Nom d'usager"
HTML follows:
Thanks
DD
Translating placeholder using i18next
Posted: Sun May 11, 2014 11:02 pm
by Doo Dad
OK... the proble comes from the fact that in the translation.json file my variable wa named input.username ..... as soon as I changed it to inputusername it worked ....
Translating placeholder using i18next
Posted: Sun May 11, 2014 11:03 pm
by Doo Dad
OK... the problem comes from the fact that in the translation.json file my variable wa named input.username ..... as soon as I changed it to inputusername it worked ....
problem solved 
Translating placeholder using i18next
Posted: Sun Aug 23, 2015 5:28 pm
by Simone Matteo Stefano Riccardo
Sorry. but this solution does not work for me. I ad doing this:
I am not using a translate.json, but just the resource_locale_*.js files. Maybe that's the problem
Translating placeholder using i18next
Posted: Mon Aug 24, 2015 12:35 pm
by Serhii Kulibaba
Hello Simone, could you create translate.json and check it again?
Translating placeholder using i18next
Posted: Mon Aug 24, 2015 7:12 pm
by Simone Matteo Stefano Riccardo
Hello Sergiy,
thansk for the answer. Where should I put the translate.json file? Should I also include it somewhere in the app?
Thank you very much
Translating placeholder using i18next
Posted: Mon Aug 31, 2015 12:55 pm
by Serhii Kulibaba