i'm using WPML for translations on the wordpress website. Now i want to get the current language code, to redirect to the right site.
I've founded for that two ways: Using the ICL_LANGUAGE_CODE or the filter-function wpml_current_language. The thing is, that both ways returns always the language code de. Also, if i change the language to english with the language switcher.
Do anyone have an idea how i can get the current language code?