From 2ab36ff777767604800efa932a75db3a88f00cf4 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 6 May 2013 18:46:03 +1200 Subject: [PATCH] FIX: Allow both 3.0 and 3.1 syntax for i18n --- code/model/Translatable.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index 9314c9a..05dfd39 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -1464,7 +1464,8 @@ class Translatable extends DataExtension implements PermissionProvider { 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]; }