WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Used multi-language because that's was already used and multilingual was not. – MikeSchinkel Aug 23 '10 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 '12 at 0:51
@brasofilo Okay, thanks. – MikeSchinkel Dec 26 '12 at 0:54
up vote 4 down vote accepted

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!

share|improve this answer
Works great! Thanx. – naugtur Aug 23 '10 at 11:30

Try this one, it worked very fine with me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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