Skip to content

Conversation

@ua2004
Copy link

@ua2004 ua2004 commented Jan 9, 2020

Added 'localized' attribute. If it is 'true', a respective language file is used from the 'tweeb/tinymce-i18n' package

…ile is used from the 'tweeb/tinymce-i18n' package
$this->tinymceAssetsDir = Yii::app()->assetManager->publish(Yii::getPathOfAlias('vendor.tinymce.tinymce'));
if($this->localized) {
$this->tinymceLangsDir = Yii::app()->assetManager->publish(Yii::getPathOfAlias('vendor.tweeb.tinymce-i18n.langs'));
$this->defaultSettings['language_url'] = $this->tinymceLangsDir . '/' . Yii::app()->language . '.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should ensure that this file exist before we try to load it. It may also require some normalization, since there may be different conventions for languge code (pt vs pt_pt vs pt_PT).

@rob006 rob006 self-assigned this Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants