Changeset 22085 for branches/version-2_12-multilang/data/class/helper
- Timestamp:
- 2012/11/08 14:01:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-multilang/data/class/helper/SC_Helper_Locale.php
r22049 r22085 50 50 // Set language code when it is not set. 51 51 if ($lang_code === FALSE) { 52 $lang_code = LANG_CODE; 52 if (defined(LANG_CODE)) { 53 $lang_code = LANG_CODE; 54 } else { 55 $lang_code = 'en'; 56 } 53 57 } 54 58 // Get string list of specified language. 55 $translations = $this->get_translations($lang_code, $device_type_id); 56 // Whether a string which corresponding with alias is exist. 57 if (isset($translations[$string])) { 58 return $translations[$string]; 59 } 60 else { 59 if ($lang_code == 'en') { 61 60 return $string; 61 } else { 62 $translations = $this->get_translations($lang_code, $device_type_id); 63 // Whether a string which corresponding with alias is exist. 64 if (isset($translations[$string])) { 65 return $translations[$string]; 66 } 67 else { 68 return $string; 69 } 62 70 } 63 71 } … … 151 159 // Set language code when it is not set. 152 160 if ($lang_code === FALSE) { 153 $lang_code = LANG_CODE; 161 if (defined(LANG_CODE)) { 162 $lang_code = LANG_CODE; 163 } else { 164 $lang_code = 'en'; 165 } 154 166 } 155 167 // Get a formula
Note: See TracChangeset
for help on using the changeset viewer.
