mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fix empty default lang bug (#4608)
* Fix bug #4583 * Fix empty default lang bug
This commit is contained in:
parent
b41882639e
commit
174b4760ab
1 changed files with 4 additions and 1 deletions
|
|
@ -229,7 +229,10 @@ public class SettingsFragment extends PreferenceFragmentCompat {
|
|||
/**
|
||||
* Changing the default app language with selected one and save it to SharedPreferences
|
||||
*/
|
||||
public void setLocale(final Activity activity, final String userSelectedValue) {
|
||||
public void setLocale(final Activity activity, String userSelectedValue) {
|
||||
if (userSelectedValue.equals("")) {
|
||||
userSelectedValue = Locale.getDefault().getLanguage();
|
||||
}
|
||||
final Locale locale = new Locale(userSelectedValue);
|
||||
Locale.setDefault(locale);
|
||||
final Configuration configuration = new Configuration();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue