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

git-svn-id: https://develop.svn.wordpress.org/trunk@7885 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-05-04 17:28:42 +00:00
parent 232bc0c1e2
commit e668d3e404
1 changed files with 1 additions and 7 deletions

View File

@ -38,7 +38,7 @@ function get_locale() {
$locale = WPLANG;
if (empty($locale))
$locale = '';
$locale = 'en_US';
$locale = apply_filters('locale', $locale);
@ -263,8 +263,6 @@ function load_textdomain($domain, $mofile) {
*/
function load_default_textdomain() {
$locale = get_locale();
if ( empty($locale) )
$locale = 'en_US';
$mofile = ABSPATH . LANGDIR . "/$locale.mo";
@ -291,8 +289,6 @@ 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;
@ -315,8 +311,6 @@ 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);