Changeset 3425
- Timestamp:
- 01/10/2006 10:53:40 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-l10n.php
r2888 r3425 13 13 14 14 // WPLANG is defined in wp-config. 15 if (defined('WPLANG')) { 16 $locale = WPLANG; 17 } 15 if (defined('WPLANG')) 16 $locale = WPLANG; 18 17 19 if (empty($locale)) { 20 $locale = 'en_US'; 21 } 18 if (empty($locale)) 19 $locale = 'en_US'; 22 20 23 21 $locale = apply_filters('locale', $locale); … … 30 28 global $l10n; 31 29 32 if (isset($l10n[$domain])) {33 return $l10n[$domain]->translate($text);34 } else {30 if (isset($l10n[$domain])) 31 return apply_filters('gettext', $l10n[$domain]->translate($text), $text); 32 else 35 33 return $text; 36 }37 34 } 38 35 … … 41 38 global $l10n; 42 39 43 if (isset($l10n[$domain])) {44 echo $l10n[$domain]->translate($text);45 } else {40 if (isset($l10n[$domain])) 41 echo apply_filters('gettext', $l10n[$domain]->translate($text), $text); 42 else 46 43 echo $text; 47 }48 44 } 49 45 … … 65 61 global $l10n; 66 62 67 if (isset($l10n[$domain])) {63 if (isset($l10n[$domain])) 68 64 return; 69 }70 65 71 if ( is_readable($mofile)) {72 73 } else {66 if ( is_readable($mofile)) 67 $input = new CachedFileReader($mofile); 68 else 74 69 return; 75 }76 70 77 71 $l10n[$domain] = new gettext_reader($input);
Note: See TracChangeset
for help on using the changeset viewer.