Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added i18n support #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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
/**
* {@inheritdoc}
*
* @throws CException
*/
public function init() {
$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