Closed ilbassa closed 7 years ago
This have nothing to do with yii2-notifications. (juste change Yii::$app->language to "it" or fix your code calling the javascript)
The code that call the javascript is in your extension, so I can fix it until next update...
in NotificatiosWidget, register Assets()
if ($filename = NotificationsAsset::getTimeAgoI18n($this->timeAgoLocale)) {
$view->registerJsFile($asset->baseUrl . '/' . $filename, [
'depends' => NotificationsAsset::className()
]);
}
and $this->timeAgoLocale is set in the run()
if (!isset($this->timeAgoLocale)) {
$this->timeAgoLocale = Yii::$app->language;
}
Ewww, so sorry for this falsy comment on my side. I'll be fixing that in a few minutes.
Should be fine now, update to last version and try again. Thank you for reporting this issue.
The language is now loaded correctly. Thanks
Hi, we have an app with Yii::$app->language set as "it-IT". The problem is that the file "jquery.timeago.it.js" is not read because the extension search for "jquery.timeago.it-IT.js".
It is possible to fix the problem?