Changeset 22266 for branches/version-2_12-multilang/data
- Timestamp:
- 2013/01/17 10:34:51 (14 years ago)
- Location:
- branches/version-2_12-multilang/data
- Files:
-
- 2 edited
- 5 moved
-
Smarty/templates/default_en-US (moved) (moved from branches/version-2_12-multilang/data/Smarty/templates/default_en)
-
Smarty/templates/sphone_en-US (moved) (moved from branches/version-2_12-multilang/data/Smarty/templates/sphone_en)
-
class/helper/SC_Helper_Locale.php (modified) (2 diffs)
-
include/common.php (modified) (3 diffs)
-
locales/en-US.mo (moved) (moved from branches/version-2_12-multilang/data/locales/en.mo)
-
locales/en-US.po (moved) (moved from branches/version-2_12-multilang/data/locales/en.po)
-
mtb_constants_init_en-US.php (moved) (moved from branches/version-2_12-multilang/data/mtb_constants_init_en.php) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-multilang/data/class/helper/SC_Helper_Locale.php
r22226 r22266 55 55 // If language code is not specified, use site default. 56 56 if (empty($options['lang_code'])) { 57 $lang_code = $options['lang_code'] = defined('LANG_CODE') ? LANG_CODE : 'en ';57 $lang_code = $options['lang_code'] = defined('LANG_CODE') ? LANG_CODE : 'en-US'; 58 58 } else { 59 59 $lang_code = $options['lang_code']; … … 73 73 74 74 // Get string list of specified language. 75 if ($lang_code != 'en') { 76 $translations = SC_Helper_Locale_Ex::$_instance->get_translations($lang_code, $device_type_id); 77 // Whether a string which corresponding with alias is exist. 78 if (isset($translations[$return])) { 79 $return = $translations[$return]; 80 } 75 $translations = SC_Helper_Locale_Ex::$_instance->get_translations($lang_code, $device_type_id); 76 // Whether a string which corresponding with alias is exist. 77 if (isset($translations[$return])) { 78 $return = $translations[$return]; 81 79 } 82 80 -
branches/version-2_12-multilang/data/include/common.php
r22101 r22266 68 68 $translated_single = $single; 69 69 $translated_plural = $plural; 70 $options['lang_code'] = 'en ';70 $options['lang_code'] = 'en-US'; 71 71 } 72 72 … … 103 103 * @return integer index 104 104 */ 105 function get_plural_index($count, $lang_code = 'en ') {105 function get_plural_index($count, $lang_code = 'en-US') { 106 106 static $plural_indexes = array(); 107 107 … … 124 124 $plural_indexes[$lang_code][$count] = $plural; 125 125 // If there is no plural formula for English 126 } elseif ($lang_code == 'en ') {126 } elseif ($lang_code == 'en-US') { 127 127 $plural_indexes[$lang_code][$count] = (int) ($count != 1); 128 128 // Otherwise, return -1 (unknown). -
branches/version-2_12-multilang/data/mtb_constants_init_en-US.php
r22265 r22266 31 31 define('UPDATE_HTTP', "http://www.ec-cube.net/info/index.php"); 32 32 /** Language code */ 33 define('LANG_CODE', "en ");33 define('LANG_CODE', "en-US"); 34 34 /** Text code */ 35 35 define('CHAR_CODE', "UTF-8"); … … 324 324 define('SLTEXT_LEN', 500); 325 325 /** Default template name (PC) */ 326 define('DEFAULT_TEMPLATE_NAME', "default_en ");326 define('DEFAULT_TEMPLATE_NAME', "default_en-US"); 327 327 /** Default template name (mobile) */ 328 328 define('MOBILE_DEFAULT_TEMPLATE_NAME', "mobile"); 329 329 /** Default template name (smartphone) */ 330 define('SMARTPHONE_DEFAULT_TEMPLATE_NAME', "sphone_en ");330 define('SMARTPHONE_DEFAULT_TEMPLATE_NAME', "sphone_en-US"); 331 331 /** Template name */ 332 define('TEMPLATE_NAME', "default_en ");332 define('TEMPLATE_NAME', "default_en-US"); 333 333 /** Mobile template name */ 334 334 define('MOBILE_TEMPLATE_NAME', "mobile"); 335 335 /** Smartphone template name */ 336 define('SMARTPHONE_TEMPLATE_NAME', "sphone_en ");336 define('SMARTPHONE_TEMPLATE_NAME', "sphone_en-US"); 337 337 /** SMARTY template */ 338 338 define('SMARTY_TEMPLATES_REALDIR', DATA_REALDIR . "Smarty/templates/");
Note: See TracChangeset
for help on using the changeset viewer.
