Report the default language also as being available for setting up the locale
fixes #6905
This commit is contained in:
parent
dc8181cdc5
commit
4ddc0e718b
|
@ -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',
|
||||
|
|
|
@ -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'));
|
||||
|
||||
|
|
|
@ -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))) {
|
||||
|
|
Loading…
Reference in New Issue