From 0d072e83dd099aeadbca17541b446c07b82bef80 Mon Sep 17 00:00:00 2001 From: Casey Peel Date: Fri, 20 Jan 2017 19:02:11 +0000 Subject: [PATCH] Set default locale to en_US en_EN isn't a valid locale because EN isn't a valid country code. Using a valid locale is important for correctly escaping of shell strings. --- SETUP/configuration.sh | 2 +- pinc/gettext_setup.inc | 2 +- pinc/languages.inc | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SETUP/configuration.sh b/SETUP/configuration.sh index c4484fa39b..cf3a8d91c3 100644 --- a/SETUP/configuration.sh +++ b/SETUP/configuration.sh @@ -82,7 +82,7 @@ _DYN_URL=$base_url/d # Some images are assumed to have text in them and need to have # different images for each language the site is translated into. # These are indicated with below. Note the default locale -# of the code is en_EN. +# of the code is en_US. # # The images can be of type png, jpg, or gif and are selected in that # order using those extensions. diff --git a/pinc/gettext_setup.inc b/pinc/gettext_setup.inc index 411f830f00..d1c090466a 100644 --- a/pinc/gettext_setup.inc +++ b/pinc/gettext_setup.inc @@ -45,7 +45,7 @@ function get_desired_language() // Fall back to English if (!@$intlang || !is_locale_translation_enabled($intlang)) { - $intlang = "en_EN"; + $intlang = "en_US"; } return $intlang; diff --git a/pinc/languages.inc b/pinc/languages.inc index 4752cb90d9..5ead93f389 100644 --- a/pinc/languages.inc +++ b/pinc/languages.inc @@ -241,10 +241,10 @@ function is_locale_translation_enabled($locale) { global $dyn_locales_dir; - // Locale 'en_EN' is always enabled because that's the default + // Locale 'en_US' is always enabled because that's the default // language of all the internal strings. We have to check for // it because there is no translation file for it. - if($locale == 'en_EN') + if($locale == 'en_US') return TRUE; $translation_base = "$dyn_locales_dir/$locale"; @@ -280,9 +280,9 @@ function get_locale_translation_selection_options() { $translations = get_installed_locale_translations("enabled"); - // push English (en_EN) onto the list since that's the native version + // push English (en_US) onto the list since that's the native version // of all the strings - array_unshift($translations, "en_EN"); + array_unshift($translations, "en_US"); // build a list of option names so we can sort them for display $options = array();