Do not export codes twice

This commit is contained in:
Siebrand Mazeland 2009-11-06 18:49:42 +01:00
parent 769e5b7622
commit f7b0017f21

View File

@ -47,6 +47,8 @@ $codeMap = array(
'zh_TW' => 'zh-hant'
);
$doneCodes = array();
foreach ($languages as $language) {
$code = $language['lang'];
@ -56,6 +58,13 @@ foreach ($languages as $language) {
continue;
}
// Do not export codes twice (happens for 'nb')
if( in_array( $code, $doneCodes ) ) {
continue;
} else {
$doneCodes[] = $code;
}
// Convert code if needed
if( isset( $codeMap[$code] ) ) {
$twnCode = $codeMap[$code];