• Hi all….
    This should be a nice easy one for all you WP supremos out there.
    I can’t seem to change my sites default language? I am sure that when WP installed it installed all of the language packs but whenever I try to set the language it reverts back to English US and I want English UK to be default. Apart from settings/general/language is there another way to force this. Doesn’t matter how many times I change it and save settings it keeps going back to English US.

    I’m using Loco Translate on my site to modify some of the system text and thought that might be the issue but deactivating the plugin made no difference at all.
    TIA ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Can you check if there’s a WPLANG constant defined in your install’s wp-config.php file?

    It would look something like:

    
    define( 'WPLANG', 'en_US' );
    

    If it exists, you can safely remove that line. Alternatively, you should be able to force it by adding that line with your language code.

    Also, test without the Loco Translate plugin active when trying the above. Some plugins may modify the wp-config.php file automatically.

    Thread Starter kioskkeith

    (@kioskkeith)

    Hi Justin (or anyone else that’s reading)

    Sorry for the delay in replying, ive been away for a few days.

    The only code similar your suggestion I found was in the wp_settings.php file nothing at all even similar in wp_config.php. The two peices of code shown below

    // Define WP_LANG_DIR if not set.
    wp_set_lang_dir();

    $locale      = get_locale();
    $locale_file = WP_LANG_DIR . "/$locale.php";
    if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
    	require $locale_file;
    }

    Cheers ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to change site default language’ is closed to new replies.