0

I found localized JS file on tinymce web site.

Now I am interested how can I integrate this localization into 2sxc module for dotnetnuke?

Jernej Pirc
  • 504
  • 1
  • 4
  • 13

2 Answers2

1

To localize more languages, please contribute to the github project https://github.com/2sic/2sxc-eav-languages

iJungleBoy
  • 5,325
  • 1
  • 9
  • 21
0

If you are using a local install of TinyMCE...

The language files for TinyMCE need to go into the langs folder inside of the main folder where TinyMCE itself is located.

For example, to load Spanish I have this file structure:

..../tinymce/langs/es.js

The second part of this is to add a parameter to the TinyMCE configuration object to tell it to load the language pack:

language: 'es'

How you get this done in 2sxc - that I don't know as I have no experience with that tool. If you can figure out where the TinyMCE files are located and how 2sxc creates the TinyMCE configuration object this should be easy to address.

If you are using TinyMCE via CDN...

You can specify a different location for the language packs (they are not currently on the CDN). The language_url configuration option allows you to do this:

https://www.tinymce.com/docs/configure/localization/#language_url

You can then place the language file(s) wherever you like. For example:

tinyMCE.init({
    language_url: 'http://example.site.com/some/path/you/pick/languages/es.js'
});

Note: You can get language packs from https://www.tinymce.com/download/language-packages/

Community
  • 1
  • 1
Michael Fromin
  • 13,131
  • 2
  • 20
  • 31
  • I found language packs, but the problem is finding local instalation of tinymce. Is it posible that the tinymce is loaded from CDN? If found this code in viewsource : – Jernej Pirc Jul 28 '16 at 20:13
  • @JernejPirc - see my edit above for CDN use and language packs. – Michael Fromin Jul 28 '16 at 20:41
  • Thanks @michael-formin I found "tinymce.init" only in file : /DesktopModules/ToSIC_SexyContent/dist/edit/extensions/field-string-wysiwyg-tinymce/set.js also found location of localization in /DesktopModules/ToSIC_SexyContent/dist/i18n/lib/tinymce but unfortunately all this and your info was not enough to make all work – Jernej Pirc Jul 29 '16 at 05:51