Setting WPLANG from a plugin

Posted by Prem Tiwari | Updated on

Setting WPLANG from a plugin. In wp-includes/l10n.php you will find the function get_locale(). It offers a filter; you can set the language and ignore the constant:

To change it per plugin use the filter 'locale'. Example:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers