If WPLANG is empty leave empty. fixes #3611

git-svn-id: https://develop.svn.wordpress.org/trunk@4764 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-01-18 17:40:05 +00:00
parent dce6021ecd
commit 11f6d0247b

View File

@ -10,7 +10,7 @@ function get_locale() {
$locale = WPLANG;
if (empty($locale))
$locale = 'en_US';
$locale = '';
$locale = apply_filters('locale', $locale);
@ -69,6 +69,9 @@ function load_default_textdomain() {
global $l10n;
$locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
$mofile = ABSPATH . LANGDIR . "/$locale.mo";
load_textdomain('default', $mofile);
@ -76,6 +79,9 @@ function load_default_textdomain() {
function load_plugin_textdomain($domain, $path = false) {
$locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
if ( false === $path )
$path = PLUGINDIR;
@ -85,6 +91,8 @@ function load_plugin_textdomain($domain, $path = false) {
function load_theme_textdomain($domain) {
$locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
$mofile = get_template_directory() . "/$locale.mo";
load_textdomain($domain, $mofile);