From fd40a069c5faec0b68a798bc121e32fa65361e64 Mon Sep 17 00:00:00 2001 From: lado Date: Sun, 30 Oct 2011 23:15:29 +0100 Subject: Some fixes regarding tu cusomt locale --- .../src/de/bjusystems/vdrmanager/data/Preferences.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'vdrmanager/src/de/bjusystems') 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; -- cgit v1.2.3