@ipstenu – Mike
Finally i solved it, I am sharing this so it might be useful for someone
@mika, The way you are doing will not work for multisite:
Because:
If you see the function at wp-includes/i10n.php
function get_locale() {
global $locale;
if ( isset( $locale ) )
return apply_filters( 'locale', $locale );
// WPLANG is defined in wp-config.
if ( defined( 'WPLANG' ) )
$locale = WPLANG;
// If multisite, check options.
if ( is_multisite() ) {
// Don't check blog option when installing.
if ( defined( 'WP_INSTALLING' ) || ( false === $ms_locale = get_option( 'WPLANG' ) ) )
$ms_locale = get_site_option('WPLANG');
if ( $ms_locale !== false )
$locale = $ms_locale;
}
if ( empty( $locale ) )
$locale = 'en_US';
return apply_filters( 'locale', $locale );
}le', $locale );
}
This function assumes, that if you have multiple websites and one wp-config.php
, then this variable should be loaded from the database under totally different name $locale
.
So be careful and remember that after installing WordPress multisite, translation files are loaded according to the site meta WPLANG
, which is saved in DB. And don’t try to update this value from the admin panel, because it is buggy and does not work. Just go to the database with phpmyadmin and change the value there.