-
-
Notifications
You must be signed in to change notification settings - Fork 42
Get the current language
Dennis Ploetner edited this page May 27, 2013
·
3 revisions
You can use the constant WPLANG provided by WordPress if you want to know the language of the current blog. It seems that this constant is empty when the current blog runs in English.
The Multisite Language Switcher sets the language to 'us' in this case. If you want to use this functionality you can write something like that:
$blog = MslsBlogCollection::instance()->get_current_blog();
$language = $blog->get_language();