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
Post a Comment