• Resolved c13303

    (@c13303)


    I’ve recently updated a working-like-a-charm wordpress
    But since 4.0 the WPLANG definition is not respected, I don’t understand.

    I got two .mo files in /wp-content/languages/
    en_GB.mo
    fr_FR.mo

    When I set in wp-config
    define(‘WPLANG’, ‘en_GB’);

    Now instead of ENGLISH, I got FRENCH:/ (with __() and _e() functions)

    echo WPLANG returns the correct ‘en_GB’ so it is correctly defined.

    If I delete fr_FR.mo, the english gets back
    If I put fr_FR.mo again, it switches to french

    What I am not getting, WPLANG is not defining language anymore ?
    Why is he still using fr_FR.mo, where is it defined ?

    I’m not using any cache plugin. I empty my browser cache. Same thing.

    Thanks for your help

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter c13303

    (@c13303)

    OK found :
    WPLANG is deprecated since 4.0

    https://core.trac.www.ads-software.com/changeset/29630

    but how can I set the language programmatically now ? (without going in admin > settings)

    Thread Starter c13303

    (@c13303)

    ok just use $locale

    :p

    solved

    hi c13303
    can u please explain what you do around this problem?
    thanks

    Thread Starter c13303

    (@c13303)

    Using

    $locale='fr_FR';

    in wp-config.php (instead of define(‘WPLANG’,’fr_FR’); ) seems to work for me.

    The other thing was that the update overwrote my custom fr_FR.mo and I had to find a backup of it.

    works fine!
    thanks!!!

    With WordPress 4.0 the field WPLANG from wp-config.php is depreciated (this was said above), it is now replaced by an option, called WPLANG stored in the database.

    It does make sense that this setting needs to be recorded in the database.
    Suggest that you look for it in the database, is the setting there appropriate ?

    @rossmitchell: Where could tthis database be found? I don’t find any clear, beginner-level instruction anywhere. I log to phpMyAdmin and I go to Search. Nothing found with keywords “WPLANG” or “locale”.

    It is usually considered poor etiquette to drop into someone else’s thread.

    This new option recorded in the database is in the table “<TablePrefix>_options”, the “option_name” field is WPLANG

    It is usually considered unpractical and annoying to post tens or hundreds of same topics/threads on the same matter instead of using those on the EXACTLY the same topic that has already been started. But if by “etiquette” you mean some rules written and applied here, in wp.org/support – than excuse me. You can provide me a link and I will make sure that I will know next time. ??

    Thank you for you kind answers!

    You may be able to find more information from the link below.
    Language chooser in 4.0

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WPLANG not working any more in 4.0’ is closed to new replies.