Detect language in wordpress template
-
I have a page with a custom template. In that WordPress template i want to load a different script for English than for Dutch.
I tried: $current_language = substr(get_locale(), 0, 2);
But get_locale gives always the original language.
I also tried to read the $_SERVER[‘REQUEST_URI’], but that also gives the original url, not the translated url. What can i do to detect the chosen language in WordPress?The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.