Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Marking componenets for translation

I am trying to understand the multi-lingual App tutorial (http://devcenter.appery.io/tutorials/...). Some points seem vague to me (I am fairly begginer in mobile App.). One of the points is marking components for translation. For example, in the tutorial, the header is marked
{(data attribute, value) :
(data-i18n, header); (data-it18-target, .ui-title)}

Do we always use 'data-i18n' as attribute?
Why .ui-title? what does it indicate?
What if I used another componenet (e.g. label) and I need to translate it? is there a reference to know what values to use ? (instead of header/button)

Thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Marking componenets for translation

Hello Hawk,

You may find more information on the developer's site:
http://i18next.com/pages/doc_features...
Here are some examples:
http://i18next.com/pages/sample.html
data-i18n-target specifies the css class. div marked with this class contains the text for translation (used for child elements). In the case of the header it is .ui-the title . The element label hasn't child elements, you may not specify the attribute data-i18n-target for it.

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Marking componenets for translation

Hi there,

is data-i18n-target for the mobileheader still ".ui-title"?

The translation workes if i just specify the data-i18n for the header, but header gets broken. If i add the data-i18n-target ".ui-title" to mobile header component, the translated strings are not displayed.
See image: Image

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

Marking componenets for translation

Hello Peter,

Please provide us with a public app link (https://devcenter.appery.io/documenta...) and steps to reproduce.

Peter LPunkt
Posts: 0
Joined: Mon Jan 13, 2014 3:07 pm

Marking componenets for translation

Hi Sergiy,

public link:
http://appery.io/app/mobile-frame?src...

I've also shared app with support, the name of the app is "revise". I added the i18next stings in the web resources. Translations for buttons etc. work fine, only the header gets broken on the page called register. On the first page the header gets translated correctly.

Steps to reproduce:
Press signin/register - then in footer register - the header on the register page gets broken, when assigning the translation with the data-i18n attribute alone (see pic above). When I add "data-i18n-target" = ".ui-title" only the english string is shown. What is the correct target in this case?

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

Marking componenets for translation

Please move i18n functions from the "Load" event to the "Page show" one for each page

Return to “Issues”