Skip to content

Commit

Permalink
Set default locale to en_US
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cpeel committed Jan 23, 2017
1 parent 35ed67a commit 0d072e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SETUP/configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <locale> 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.
Expand Down
2 changes: 1 addition & 1 deletion pinc/gettext_setup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions pinc/languages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0d072e8

Please sign in to comment.