I am running WordPress with "WPML Multilingual CMS", so that it has multiple language versions.

In a function used with add_action('template_redirect',<functionname>), I need to find out what the current language is.

What should I call?

  • Used multi-language because that's was already used and multilingual was not. Aug 23, 2010 at 19:38
  • Hi, @MikeSchinkel, I retagged this as <3.0> seems a meaningless tag... Also, I guess our comments became noise, I suggest removing both ;)
    – brasofilo
    Dec 26, 2012 at 0:51

2 Answers 2


I have no experience with the plugin whatsoever, but from a quick scout of their site, it looks like:


will give you the current language. Worth a try, anyway!

  • Works great! Thanx.
    – naugtur
    Aug 23, 2010 at 11:30
  • Warning: it will not work on WP with another plugins.
    – ViliusL
    Jul 2, 2020 at 9:09

Try this one, it worked very fine with me.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.