diff --git a/code/model/Translatable.php b/code/model/Translatable.php index b6bc768..d1c4020 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -1457,11 +1457,11 @@ class Translatable extends DataExtension implements PermissionProvider { $dbLangs = $query->execute()->column(); $langlist = array_merge((array)Translatable::default_locale(), (array)$dbLangs); $returnMap = array(); - $allCodes = array_merge(i18n::$all_locales, i18n::$common_locales); + $allCodes = array_merge(Config::inst()->get('i18n','all_locales'), Config::inst()->get('i18n','common_locales')); foreach ($langlist as $langCode) { if($langCode && isset($allCodes[$langCode])) { if(is_array($allCodes[$langCode])) { - $returnMap[$langCode] = $allCodes[$langCode][0]; + $returnMap[$langCode] = $allCodes[$langCode]['name']; } else { $returnMap[$langCode] = $allCodes[$langCode]; }