문제

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?

도움이 되었습니까?

해결책

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

ICL_LANGUAGE_CODE

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

다른 팁

Try this one, it worked very fine with me.

$lang=get_bloginfo("language");
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top