diff options
author | lado <herrlado@gmail.com> | 2011-10-30 23:15:29 +0100 |
---|---|---|
committer | lado <herrlado@gmail.com> | 2011-10-30 23:15:29 +0100 |
commit | fd40a069c5faec0b68a798bc121e32fa65361e64 (patch) | |
tree | 4c370c7d68fe58ffe825a76d71177bd207f7214d /vdrmanager/src | |
parent | c1f09d42c1cdc8f917984da6fad863d7379e4b6e (diff) | |
download | vdr-manager-fd40a069c5faec0b68a798bc121e32fa65361e64.tar.gz vdr-manager-fd40a069c5faec0b68a798bc121e32fa65361e64.tar.bz2 |
Some fixes regarding tu cusomt locale
Diffstat (limited to 'vdrmanager/src')
-rw-r--r-- | vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java index 8497db7..9f4151f 100644 --- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java +++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java @@ -16,6 +16,8 @@ import de.bjusystems.vdrmanager.R; */ public class Preferences { + public static final String DEFAULT_LANGUAGE_VALUE = "DEFAULT"; + private boolean ssl; /** SVDRP host name or ip */ private String svdrpHost; @@ -677,11 +679,13 @@ public class Preferences { * {@link Context} */ public static void setLocale(final Context context) { - final String lc = getString(context, R.string.gui_custom_locale_key, null); - if (TextUtils.isEmpty(lc)) { - return; + String lc = getString(context, R.string.gui_custom_locale_key, DEFAULT_LANGUAGE_VALUE); + Locale locale; + if(lc.equals(DEFAULT_LANGUAGE_VALUE) == false){ + locale = new Locale(lc); + } else { + locale = new Locale(""); } - final Locale locale = new Locale(lc); Locale.setDefault(locale); final Configuration config = new Configuration(); config.locale = locale; |