Page 1 of 1

Multi-language

Posted: Thu May 09, 2013 6:24 pm
by Andrés Méndez

Hello.

I would like to create my app in multiple languages (Spanish, English, French...).

I suppose that I will need to create some kind of file (dictionary) with ids of the elements, and in the elements call use the words in the dictionary.

How can I make it?

Thanks.


Multi-language

Posted: Thu May 09, 2013 7:48 pm
by maxkatz

You would need to code this capability. For any text/labels -- you could create language specific objects, for example:

saveButtonLabel = Save Product
cancelButtonLabel = Cancel Purchase

and similar once for other languages you want to use. Then, when you run the app, you would determine the language and use the appropriate language bundle.


Multi-language

Posted: Fri May 10, 2013 6:30 pm
by Andrés Méndez

Thanks Max.

But how do I change the text of an element, or how do I refer to it? Could you give a little example please?


Multi-language

Posted: Fri May 10, 2013 6:44 pm
by pafowkes

Something like this for instance;

var text = localStorage.getItem('text');
Appery('Output').text(text);

The tutorials have some examples


Multi-language

Posted: Fri May 10, 2013 6:46 pm
by Andrés Méndez

Thanks!