Permalink
Browse files

FIX: Allow both 3.0 and 3.1 syntax for i18n

  • Loading branch information...
1 parent 9daff5f commit 2ab36ff777767604800efa932a75db3a88f00cf4 @sminnee sminnee committed May 6, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 code/model/Translatable.php
@@ -1464,7 +1464,8 @@ static function get_existing_content_languages($className = 'SiteTree', $where =
foreach ($langlist as $langCode) {
if($langCode && isset($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 {
$returnMap[$langCode] = $allCodes[$langCode];
}

0 comments on commit 2ab36ff

Please sign in to comment.