For a single site wordpress, the language must be set from wp-config.php
‘s WPLANG
, but is it possible to set from my plugin which override the default value?
Leave a Reply
You must be logged in to post a comment.
For a single site wordpress, the language must be set from wp-config.php
‘s WPLANG
, but is it possible to set from my plugin which override the default value?
You must be logged in to post a comment.
In
wp-includes/l10n.php
you will find the functionget_locale()
. It offers a filter; you can set the language and ignore the constant:To change it per plugin use the filter
'locale'
. Example: