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

TinyMCE i18n #310

Closed
emu42 opened this issue Apr 12, 2017 · 5 comments
Closed

TinyMCE i18n #310

emu42 opened this issue Apr 12, 2017 · 5 comments
Labels

Comments

@emu42
Copy link

emu42 commented Apr 12, 2017

Hello,

I have another question regarding multilanguage support. I know that TinyMCE has been translated into many languages including German, but I don't know how to set up Mosaico's Tiny editor with the user's language. Is there a way to pass initialization parameters to Tiny through Mosaico's init method?

Thanks in advance!

Regards,
Edmund

@bago
Copy link
Member

bago commented Apr 13, 2017

Hi, have a look at those issues:
#233
#194
#239
#247
#178

You can configure tinymce via "mosaico viewModel plugin" (https://github.com/voidlabs/mosaico/wiki/Mosaico-Plugins)

Please report back your solution if it works.

@bago bago closed this as completed Apr 13, 2017
@bago bago added the question label Apr 13, 2017
@emu42
Copy link
Author

emu42 commented Apr 14, 2017

Thanks! I just got it to work.

I added a plugin like so:

var l10nPlugin = function(vm) {
	  ko.bindingHandlers.wysiwyg.fullOptions['language'] = 'de';
}

But then the language pack for TinyMCE was still missing so I also downloaded and saved those packs to bower_components/tinymce/langs. Then I added that directory to the bowercopy task to get the packs where I need them:

          'plugins': 'tinymce/plugins',
          'langs': 'tinymce/langs',
          'notoregular': 'webfont-notosans/regular',

And finally, it looks like I have a fully translated version of Mosaico running (Mosaico menus, template and TinyMCE).

Thanks for your continued support, Bago!

BTW we also corrected some of the German translations along the way and I'd like to contribute those back to Mosaico. I'll sign up on transifex later today...

@Shwele
Copy link

Shwele commented Aug 16, 2017

Sorry to open this issue, but I am unable to add newly translated lang from Transifex to my Mosaico on CiviCRM.

I have added .json file on path /files/civicrm/ext/uk.co.vedaconsulting.mosaico/packages/mosaico/dist/lang

Colleague of mine translated it to Serbian today so I've added it in correspondent folder mentioned above.

So the question is... where to enable language I want for Mosaico?
If I should be adding it as plugin, like emu42 proposed, in what file should I add that?

Thanks in advance.

@bago
Copy link
Member

bago commented Aug 17, 2017

@Shwele this issue is named "Tinymce i18n issue": are you having issues with tinymce i18n or with mosaico i18n?

@Shwele
Copy link

Shwele commented Aug 17, 2017

Yea, I am aware of it, tho its the only problem/solution I could refer to for the issues I am having.

since you did refer to mosaico... Ill open a new topic if it is unrelated and not needed. Sorry for bumping it if it is a mistake.

Never mind, changing the language on CiviCRM apparently changes the language of Mosaico itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants