2amigos / yii2-tinymce-widget

TinyMCE WYSIWYG widget for Yii2
http://yiiwheels.com
Other
100 stars 48 forks source link

language files #22

Closed ComradePashka closed 7 years ago

ComradePashka commented 8 years ago

if you set up language to 'en' there is no en.js file at langs folder of corresponding asset but only en_CA.js and en_GB.js, so if I try to use ISO-639 two-letters language variable at multilanguage site I will get error everytime I switch to English.

mmalisz commented 7 years ago

Bumping this issue.

tonydspaniard commented 7 years ago

what you propose @mmalisz ?

mmalisz commented 7 years ago

@tonydspaniard, well, I use two languages for my app: polish (pl-PL) and english (en-UK). As for polish, simple explode works, however, as stated in original report, en doesn't work. Given that, I had to make special case for 'en' -- detecting UK in Yii::$app->languages then producing proper language string. Haven't looked at the code of the widget, but I see that 'language' param is not defined within 'clientOptions', so maybe some switch-case on the widget side will be enough.

tonydspaniard commented 7 years ago

This has been fixed on latest update