mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
FIX: Allow both 3.0 and 3.1 syntax for i18n
This commit is contained in:
parent
9daff5f2d0
commit
2ab36ff777
@ -1464,7 +1464,8 @@ class Translatable extends DataExtension implements PermissionProvider {
|
|||||||
foreach ($langlist as $langCode) {
|
foreach ($langlist as $langCode) {
|
||||||
if($langCode && isset($allCodes[$langCode])) {
|
if($langCode && isset($allCodes[$langCode])) {
|
||||||
if(is_array($allCodes[$langCode])) {
|
if(is_array($allCodes[$langCode])) {
|
||||||
$returnMap[$langCode] = $allCodes[$langCode]['name'];
|
if(isset($allCodes[$langCode]['name'])) $returnMap[$langCode] = $allCodes[$langCode]['name'];
|
||||||
|
else $returnMap[$langCode] = $allCodes[$langCode][0];
|
||||||
} else {
|
} else {
|
||||||
$returnMap[$langCode] = $allCodes[$langCode];
|
$returnMap[$langCode] = $allCodes[$langCode];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user