tinyMCE Spellchecker - adding a new language

9 posts by 3 authors in: Forums > CMS Builder
Last Post: October 22, 2009   (RSS)

By northernpenguin - October 21, 2009

Hi!

I'm trying to add the french language spellchecker to tinyMCE (CMSB v1.36). I've added all the required language files, but the tinyMCE spellcheck dropdown still only displays "En" or english.

Has anyone installed an additional language and can you help?

Thanx...... Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] tinyMCE Spellchecker - adding a new language

By northernpenguin - October 21, 2009

Ok, I think I've figured what's going on. I can change the tinyMCE language only from the "General Settings" page of CMSB.

Unfortunately, I have a requirement to support a bilingual website (English & French) and therefore need to allow users to spellcheck in the language of their choice.

Is there anyway to define 2 instances of tinyMCE in one section editor, each tinyMCE using a different language? That would allow me to spell check the English language text in Field1 and the French language Text in Field2.

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] tinyMCE Spellchecker - adding a new language

By Chris - October 21, 2009

Hi Ragi,

I can't think of a solution for you. Of course, I'm not intimately familiar with how TinyMCE works or its codebase -- you may have better luck asking the [url http://tinymce.moxiecode.com/punbb/]TinyMCE community[/url].

If you don't have the time to research this, or aren't having any luck, we might be able to develop a solution for you through our consulting services. Please let me know if you're interested in that.

Sorry I couldn't be of more help!
All the best,
Chris

Re: [chris] tinyMCE Spellchecker - adding a new language

By northernpenguin - October 21, 2009

Thanx Chris, I'll try the tinyMCE community and see what I can dig up!
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [Dave] tinyMCE Spellchecker - adding a new language

By northernpenguin - October 22, 2009

Dave: looks interesting, except that I am a bit stumped. Should I be editing the file found at "cmsAdmin/3rdParty/tiny_mce/plugins/spellchecker/editor_plugin.js"? Because it already has French=fr included. I figured I might have to add the "+" sign in front of French, but no go.

I think I'll have to do some more reading and post on the tinyMCE forum.

Thanx for your help!

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] tinyMCE Spellchecker - adding a new language

By Dave - October 22, 2009

I'd try editing the /lib/wysiwyg.php file. I think once you have multiple languages in there you should get a pulldown by the spellcheck button to allow you to select which language you want to check.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] tinyMCE Spellchecker - adding a new language

By northernpenguin - October 22, 2009

Dave: wysiwyg.php has the foll entry:

tinyMCE.init({
mode : "exact",
theme : "advanced",
language: "{$SETTINGS['wysiwyg']['wysiwygLang']}",
spellchecker_languages: "+{$SETTINGS['wysiwyg']['wysiwygLang']}={$SETTINGS['wysiwyg']['wysiwygLang']}",


I replaced spellchecker_languages with:

spellchecker_languages: "+English=en,French=fr"

It works great! However, you should note that this will work with the Google Spellchecker, not PSpell. With PSpell you get the foll error msg

Error response: <br />
<b>Warning</b>: pspell_new() [<a href='function.pspell-new'>function.pspell-new</a>]: PSPELL couldn't open the dictionary.
reason: No word lists can be found for the language "fr". in <b>/home/xxxxx/public_html/cmsAdmin/3rdParty/tiny_mce/plugins/spellchecker
/classes/PSpell.php</b> on line <b>60</b><br /> {"result":null,"id":null,"error":{"errstr":"No PSpell link found
opened.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}


Based on this error, I obviously need a French dictonary.

However, I'm happy!!

Thank you very much for your assistance!

Ragi

[:)]
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

Re: [northernpenguin] tinyMCE Spellchecker - adding a new language

By northernpenguin - October 22, 2009

Dave: just confirmed that the French dictionary for PSpell/ASpell is not installed on my server by my ISP. Anyone else who needs any dictionary other their default language will probably need to speak to their ISP to install it.

In the mean time, the Google Spellchecker works well.

Cheers and thanks for the help!

Ragi
--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke