• if setting WPLANG in wp-config.php is not working for you then it’s highly likely that wp-l10n.php never knows about it.
    You can force this by adding the following line to wp-l10n.php at the beginning:
    require('../wp-config.php');
    if it works then it is clear that WPLANG has not been passed on properly.
    Use this only for testing.
    You still can simply set the $locale directly in wp-l10n.php, this will always work.
    BTW: it has nothing to do with register globals settings, i tried both on and off, made no difference.
    HTH
    eke

Viewing 4 replies - 1 through 4 (of 4 total)
  • Directly setting $locale did the trick for me, thanks!

    thanks a deal!
    I had to writhe the require first, and change the locale directly.
    now it works

    I wrote the require, changed the $locale, put the same thing (pt_BR) both on the $locale and the wp-config.php…. but it doesn’t work!

    It’s not a problem with the pt_BR.mo file, ‘cos I used it on another installation and it worked fine there….

    Any ideia on what should I do?

    i’m using 1.5.1.2.

    the language file nl_NL.mo was not being used; i was getting en_US instead of nl_NL. WPLANG was set up ok in wp-config.php.

    in wp-l10n.php, in the function get_locale(), the first instruction is:

    if (isset($locale)) return $locale;

    the code to check WPLANG and then to set the value of $locale appears *after* this instruction.

    on two of the 3 plesk systems i use (including the one where i was having this problem with nl_NL), the value of $locale is set by the system, in one case to ‘en’ and in the other to ‘en-US’. on the third system, $locale is not set. therefore, on the two machines where $locale is already defined by the system, control was returning from the function before the value of WPLANG was being checked.

    as the values for $locale used by wordpress are in the form xx_xx, i’ve changed the instruction quoted above to:

    if (isset($locale) && stristr($locale,'_') > 0) return $locale;

    i’m not happy with this hack. maybe the name of the variable could be changed to ‘wp-locale’?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WPLANG not working? read this’ is closed to new replies.