Changes from branches/2.6/wp-includes/l10n.php at r8557 to trunk/wp-includes/l10n.php at r8065
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r8557 r8065 243 243 global $l10n; 244 244 245 if (isset($l10n[$domain])) 246 return; 247 245 248 if ( is_readable($mofile)) 246 249 $input = new CachedFileReader($mofile); … … 248 251 return; 249 252 250 $gettext = new gettext_reader($input); 251 252 if (isset($l10n[$domain])) { 253 $l10n[$domain]->load_tables(); 254 $gettext->load_tables(); 255 $l10n[$domain]->cache_translations = array_merge($gettext->cache_translations, $l10n[$domain]->cache_translations); 256 } else 257 $l10n[$domain] = $gettext; 258 259 unset($input, $gettext); 253 $l10n[$domain] = new gettext_reader($input); 260 254 } 261 255 … … 263 257 * load_default_textdomain() - Loads default translated strings based on locale 264 258 * 265 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.259 * Loads the .mo file in LANGDIR constant path from WordPress root. 266 260 * The translated (.mo) file is named based off of the locale. 267 261 * … … 271 265 $locale = get_locale(); 272 266 273 $mofile = WP_LANG_DIR . "/$locale.mo";267 $mofile = ABSPATH . LANGDIR . "/$locale.mo"; 274 268 275 269 load_textdomain('default', $mofile);
Note: See TracChangeset
for help on using the changeset viewer.