localization - Android Language selection -


i have code in choose language layouts , didn't work. tested german (deutsch) iso 3 code deu , spanish, spa -- did not work either, or code different?

string locale = locale.getdefault().getiso3language().tostring(); if (locale.equals("spa")) {     setcontentview(r.layout.es_pcversion); } else {     setcontentview(r.layout.pcversion); } 

you must use values ​​files , translate text inside.

for example, string.xml in values-es text spanish language.

the gains folder containing string.xml file, default language.

more information here : supporting different languages


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -