Always set the locale to something. Fixes #6872 props MarcoZ.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-05-04 17:28:42 +00:00
parent 38ebc1a0ee
commit 9962fa1f0b
1 changed files with 1 additions and 7 deletions

View File

@ -38,7 +38,7 @@ function get_locale() {
$locale = WPLANG; $locale = WPLANG;
if (empty($locale)) if (empty($locale))
$locale = ''; $locale = 'en_US';
$locale = apply_filters('locale', $locale); $locale = apply_filters('locale', $locale);
@ -263,8 +263,6 @@ function load_textdomain($domain, $mofile) {
*/ */
function load_default_textdomain() { function load_default_textdomain() {
$locale = get_locale(); $locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
$mofile = ABSPATH . LANGDIR . "/$locale.mo"; $mofile = ABSPATH . LANGDIR . "/$locale.mo";
@ -291,8 +289,6 @@ function load_default_textdomain() {
*/ */
function load_plugin_textdomain($domain, $path = false) { function load_plugin_textdomain($domain, $path = false) {
$locale = get_locale(); $locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
if ( false === $path ) if ( false === $path )
$path = PLUGINDIR; $path = PLUGINDIR;
@ -315,8 +311,6 @@ function load_plugin_textdomain($domain, $path = false) {
*/ */
function load_theme_textdomain($domain) { function load_theme_textdomain($domain) {
$locale = get_locale(); $locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
$mofile = get_template_directory() . "/$locale.mo"; $mofile = get_template_directory() . "/$locale.mo";
load_textdomain($domain, $mofile); load_textdomain($domain, $mofile);