android - Wrong language fonts at multi language app -


i'm trying make multilanguage app, english , greek. want 2 buttons @ first screen u choose language , other app bve @ language. have make simple test project 2 buttons , paragraph, when u push english button text english, when u push greek button text greek. code

    @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_page2);      button english = (button) findviewbyid(r.id.english);     english.setonclicklistener(new onclicklistener() {         public void onclick(view v) {             locale locale = new locale("en_uk");              locale.setdefault(locale);             configuration config = new configuration();             config.locale = locale;              getapplicationcontext().getresources().updateconfiguration(config, null);     intent intent = new intent(v.getcontext(), mainactivity.class);             startactivityforresult(intent, 0);         }      });     button greek = (button) findviewbyid(r.id.greek);     greek.setonclicklistener(new onclicklistener() {         public void onclick(view v) {             locale locale = new locale("el_gr");              locale.setdefault(locale);             configuration config = new configuration();             config.locale = locale;              getapplicationcontext().getresources().updateconfiguration(config, null);             intent intent = new intent(v.getcontext(), mainactivity.class);             startactivityforresult(intent, 0);         }      });    } 

the strings.xml english paragraph @ original res/values folder , strings.xml greek language in res/values-el

here 3 screenshots test app here screenshots:

http://s18.postimg.org/dw0dvdsr9/screenshot_2013_09_04_15_27_58.png

http://s18.postimg.org/6u2g96p5h/screenshot_2013_09_04_15_28_08.png

http://s18.postimg.org/7kv6eyrit/screenshot_2013_09_04_15_28_14.png

the 1 non letters things greek paragraph

the problem phone doesnot supports unicode characters greek, there 2 solutions,

1)it means fonts device uses not support greek characters (hence unknown unicode). need find better font , use in application (see http://developer.android.com/reference/android/graphics/typeface.html docs)

2)get online unicode converter or google translator english greek , copy words strings.xml


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -