Do not export codes twice
This commit is contained in:
parent
769e5b7622
commit
f7b0017f21
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user