Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
tinyMCE Spellchecker - adding a new language

 

 


northernpenguin
User

Oct 21, 2009, 10:37 AM

Post #1 of 9 (2673 views)
Shortcut
tinyMCE Spellchecker - adding a new language Can't Post

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


northernpenguin
User

Oct 21, 2009, 11:04 AM

Post #2 of 9 (2672 views)
Shortcut
Re: [northernpenguin] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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


Chris
Staff


Oct 21, 2009, 1:48 PM

Post #3 of 9 (2668 views)
Shortcut
Re: [northernpenguin] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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 TinyMCE community.

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!
Chris


northernpenguin
User

Oct 21, 2009, 2:15 PM

Post #4 of 9 (2665 views)
Shortcut
Re: [chris] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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


Dave
Staff / Moderator


Oct 21, 2009, 6:12 PM

Post #5 of 9 (2659 views)
Shortcut
Re: [northernpenguin] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

Here's a link on the docs for the spellchecker plugin:
http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker

If you look for 'spellchecker_languages' it looks like you could add this line to support multiple languages:

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

Although I'm not sure if it supports checking both at the same time. (You'd want to update that line in /lib/wysiwyg.php).

Hope that helps! Let us know what you find out.

Dave Edis - Senior Developer
interactivetools.com
 


northernpenguin
User

Oct 22, 2009, 6:50 AM

Post #6 of 9 (2655 views)
Shortcut
Re: [Dave] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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


Dave
Staff / Moderator


Oct 22, 2009, 11:27 AM

Post #7 of 9 (2652 views)
Shortcut
Re: [northernpenguin] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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
 


northernpenguin
User

Oct 22, 2009, 11:59 AM

Post #8 of 9 (2649 views)
Shortcut
Re: [Dave] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

Dave: wysiwyg.php has the foll entry:


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


I replaced spellchecker_languages with:


Code
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


Code
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

Smile
--
northernpenguin
Northern Penguin Technologies

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


northernpenguin
User

Oct 22, 2009, 2:25 PM

Post #9 of 9 (2644 views)
Shortcut
Re: [northernpenguin] tinyMCE Spellchecker - adding a new language [In reply to] Can't Post

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