Sophie
Posts: 0
Joined: Tue Mar 04, 2014 4:30 pm

Translate listitem using the i18next plug-in

Hello,

My app provides UI in several languages using the i18next plug-in.
It works fine but I don't find the way to translate listitem.
I've tried several things on "More properties" button :

1.pgn : translation works but image and click event are lost on the item
2.pgn : translation do not works but image and click event are working
2.pgn : translation do not works but image and click event are working

Does someone could help ?

Thank you in advance

Sophie. Image Image Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Translate listitem using the i18next plug-in

Hi Sophie,

Unfortunatly you did not provide us information about what exactly component inside your listItems you want to translate.

If you want to translate simple listItem you should add following attributes to the listItem:

data-i18n - header
data-i18n-target - h3

See details: http://prntscr.com/4ginbh/direct

Also after list populated you need to invoke code:

pre

$(document).i18n();

/pre

Also if after these settings you still have this problem please provide us your app public link and describe steps to reproduce this problem.

Regards.

Sophie
Posts: 0
Joined: Tue Mar 04, 2014 4:30 pm

Translate listitem using the i18next plug-in

Hi Yuri,

Thank you for your answer.

I have a list named "list_menu" with three listitems hardcoded in French :

Text : "Immeuble" - Name : "listitem_imme"
Text : "Etat des lieux" - Name : "listitem_etli"
Text : "A louer" - Name : "listitem_objv"

1.pgn : First listitem "Immeuble" properties
2.pgn : translation dot not work but image and click event are ok
3.pgn : Second listitem "Etat des lieux" translation works but image and click event are not working

I would like to translate text property but i can't find the way.

$ (document) .i18n (); already invoked.
Translations work well for the other components, but not for listitems.

Best regards.

Sophie. Image Image Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Translate listitem using the i18next plug-in

Hi Sophie,

Did you see my screen shot http://prntscr.com/4gt1sf/direct ?

If so why did not you set this attribute ?

Please try to use this attribute with this value.

Regards.

Sophie
Posts: 0
Joined: Tue Mar 04, 2014 4:30 pm

Translate listitem using the i18next plug-in

Hi Yurii,

I tried your solution but it doesn't work.
How the plugin can differentiate the first item to translate the 2nd or 3rd ?
I don't understand.

Best regards.

Image Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Translate listitem using the i18next plug-in

Hi Sophie,

You need to set in "data-i18n" attribute appropriate translation id from translation file.

In this case you can set different translation id for different list items.

Please take a look on this screen shot: http://prntscr.com/4h4oo6/direct

Regards.

Return to “Issues”