Skip to content

Added i18n support - #1

Open
ua2004 wants to merge 1 commit into
rob006-software:masterfrom
ua2004:added-i18n-support
Open

ua2004 wants to merge 1 commit into
rob006-software:masterfrom
ua2004:added-i18n-support

Conversation

@ua2004

@ua2004 ua2004 commented Jan 9, 2020

Copy link
Copy Markdown

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
Comment thread src/TinyMceWidget.php
$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
Copy Markdown
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