Doo Dad
Posts: 0
Joined: Sun May 11, 2014 8:04 pm

Translating placeholder using i18next

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Translating placeholder using i18next

Hello,

Using below link you could find example with placeholder
http://i18next.com/pages/sample.html

Doo Dad
Posts: 0
Joined: Sun May 11, 2014 8:04 pm

Translating placeholder using i18next

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

Image

Doo Dad
Posts: 0
Joined: Sun May 11, 2014 8:04 pm

Translating placeholder using i18next

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 ....

Doo Dad
Posts: 0
Joined: Sun May 11, 2014 8:04 pm

Translating placeholder using i18next

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 :-)

Simone Matteo Stefano Riccardo
Posts: 0
Joined: Sun Aug 23, 2015 5:28 pm

Translating placeholder using i18next

Sorry. but this solution does not work for me. I ad doing this:
Image

I am not using a translate.json, but just the resource_locale_*.js files. Maybe that's the problem

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Translating placeholder using i18next

Hello Simone, could you create translate.json and check it again?

Simone Matteo Stefano Riccardo
Posts: 0
Joined: Sun Aug 23, 2015 5:28 pm

Translating placeholder using i18next

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

Return to “Issues”