iamjazzar/rosetta

Setting language without LanguageSwitcherDialog

Closed this issue · 3 comments

Hello, Amazing work.
I want to set language programmatically without showing the Dialog of languages.
Something like ls.setlanguage("En") or similar.

Hello @aitbaali:

You can use one of the following methods to set your app locale manually from an activity:

// USAGE: ls.setLocale("En", this)
public boolean setLocale(String newLocale, Activity activity);
// USAGE: ls.setLocale(Locale.ENGLISH , this)
public boolean setLocale(Locale newLocale, Activity activity);

If this does not solve your issue, please tell.

@AhmedAljazzar sorry for my late response, I was busy, I will give it a try.