codemix/yii2-localeurls

Add setlocale

flahol opened this issue · 1 comments

I think we should add gettext compatibility.

When the language is changed we should use the php function setlocale.
For example
if $language = 'en-US'

When we set
Yii::$app->language = $language;

We could add
setlocale(LC_ALL, str_replace('-', '_', $language) . '.utf8');

I don't think, that this is in the scope of this extension. If at all, this should maybe happen in setLanguage() in the Yii core or something.