Report the default language also as being available for setting up the locale

fixes #6905
This commit is contained in:
Johannes Meyer 2014-08-14 10:48:52 +02:00
parent dc8181cdc5
commit 4ddc0e718b
3 changed files with 1 additions and 3 deletions

View File

@ -93,7 +93,6 @@ class GeneralForm extends Form
foreach (Translator::getAvailableLocaleCodes() as $language) {
$languages[$language] = $language;
}
$languages[Translator::DEFAULT_LOCALE] = Translator::DEFAULT_LOCALE;
$this->addElement(
'select',

View File

@ -33,7 +33,6 @@ class GeneralForm extends Form
foreach (Translator::getAvailableLocaleCodes() as $language) {
$languages[$language] = $language;
}
$languages[Translator::DEFAULT_LOCALE] = Translator::DEFAULT_LOCALE;
$prefs = $this->getUserPreferences();
$useDefaultLanguage = $this->getRequest()->getParam('default_language', !$prefs->has('app.language'));

View File

@ -115,7 +115,7 @@ class Translator
*/
public static function getAvailableLocaleCodes()
{
$codes = array();
$codes = array(static::DEFAULT_LOCALE);
foreach (array_values(self::$knownDomains) as $directory) {
$dh = opendir($directory);
while (false !== ($name = readdir($dh))) {