Hello, I am having trouble in trying to change the language in my code , just like this thread: http://wpml.org/forums/topic/set-language-in-code-before-page-loads/ I have trien following the stepf here but no luck. Here’s my code: add_action(‘after_setup_theme’, ‘my_icl_set_current_language’); function my_icl_set_current_language() { $lang = $_GET[‘lang’]; global $sitepress; $sitepress->switch_lang($lang); die(ICL_LANGUAGE_CODE ); } The ICL_LANGUAGE_CODE constant never changes to the desired […]
Kilde: Change language programaticly – WPML