Changeset 4436

Show
Ignore:
Timestamp:
01/03/13 11:23:22 (1 month ago)
Author:
demian
Message:

better recognition of traditional chinese lang code, fixes #1756

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/SGL/Translation3/Driver.php

    r4223 r4436  
    396396            foreach ($aLangs as $langCode) { 
    397397                // don't take care of locale for now, only main language 
    398                                 $langCode = ($langCode == 'zh-tw') ? 'zhtw' : substr($langCode, 0, 2); 
     398                                $langCode = (in_array($langCode, array('zh-tw','zh-TW'))) ? 'zhtw' : substr($langCode, 0, 2); 
    399399                $langCodeCharset = $langCode . '-' . self::getDefaultCharset(); 
    400400                if (self::isAllowedLangCodeCharset($langCodeCharset)) {