Page 1 of 1

Translate listitem using the i18next plug-in

Posted: Mon Aug 25, 2014 12:57 pm
by Sophie

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


Translate listitem using the i18next plug-in

Posted: Tue Aug 26, 2014 2:34 am
by Yurii Orishchuk

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.


Translate listitem using the i18next plug-in

Posted: Tue Aug 26, 2014 8:12 am
by Sophie

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


Translate listitem using the i18next plug-in

Posted: Tue Aug 26, 2014 11:11 pm
by Yurii Orishchuk

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.


Translate listitem using the i18next plug-in

Posted: Wed Aug 27, 2014 9:10 am
by Sophie

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


Translate listitem using the i18next plug-in

Posted: Wed Aug 27, 2014 10:16 pm
by Yurii Orishchuk

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.