Last active
September 21, 2018 10:15
-
-
Save rafasashi/0731a5ae1dfa5ccb6de865926155901a to your computer and use it in GitHub Desktop.
Add the following code in wp-config.php before requesting wp-settings.php https://code.recuweb.com/get/language-switcher/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup the main language from cookies | |
// to be added in wp-config.php before wp-settings | |
if( !empty($_COOKIE['lsw_main_lang']) ){ | |
$locale = $_COOKIE['lsw_main_lang'] . '_' . strtoupper($_COOKIE['lsw_main_lang']); | |
if(!defined('WPLANG')) | |
define ('WPLANG', $locale); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment