asofter / yii2-imperavi-redactor

Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii 2)
Other
86 stars 53 forks source link

Setting language #25

Open marqu3s opened 9 years ago

marqu3s commented 9 years ago

For languages like pt_pt or pt_br the logic in ImperaviRedactorAsset init() method fails because it gets only the first 2 letters of Yii language. In this case there will be no pt.js in redactor to publish and the widget fails to load.

Also, Yii uses pt-BR and redactor pt_br for setting language so an inconsistence exists. You should convert Yii format to redactor format.

flybot commented 9 years ago

I agree with @marqu3s , there is a problem. My app use 'uk' as language but imperavi-redactor use ua.js for Ukrainian. Should be allowed to set the language as an option, please.