Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Content Editor Discussions /

Forum for content editors and CMS users.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Setting the spell checking language


Go to End


14 Posts   9693 Views

Avatar
TF-35Lightning

Community Member, 137 Posts

21 April 2010 at 4:37pm

Hello all, I am trying to change to a UK English instead of US english, I've tried folloiwng the instructions above but I have had no luck.

Here is what I have tried.

edited mysite/_config.php with
HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', '+Deutsch=de');

(using german first just so I can see the change in what is selected but I cant even get that).

Not sure if I need to be editing other files etc.

Any help would be great

Avatar
Platypus

Community Member, 43 Posts

21 April 2010 at 6:41pm

With SS 2.3.7 I had to edit CMSMain.php in CMS/code - I know patching a core file is dirty and brings more work if it comes to upgrading to a new SS version.

But when you replace line 102 in CMSMain.php with

HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', '+Deutsch=de');

it should work :-)

Regards,
Platypus

Avatar
TF-35Lightning

Community Member, 137 Posts

21 April 2010 at 8:13pm

Hi Platypus

Yes I'm on 2.4 but I do that (removing//commenting out the existing line) and I now see that under the spell checker drop down that german is the spell checker (which is good) but then when I click the actual spell checker button the whole browser locks up. In chrome it says the script has run too long or something like that, so I'm not too sure what to do now.

Avatar
TF-35Lightning

Community Member, 137 Posts

22 April 2010 at 7:42pm

also guys I have just noticed after installing a fresh SS 2.4 copy on wamp that the spell checker crashes my browser.

Where as up on my live website wen hosted version of the same file, the spell check operates normally. Is there any reason why it would behave in such a way on my local machine???

Also does anyone know what code I need to use to change the default spell checking language to English UK or English / Australian.

I see German is +Deutsch=de
Where abouts are these codes listed??? I cant find the document.

Any help would be great

Avatar
Platypus

Community Member, 43 Posts

23 April 2010 at 5:41am

Hi, regarding SS 2.4 I'm sorry, I currently only use 2.3.7. But I can help you with these codes... they are not SS related, and it's also not TinyMCE. These are Google's Language Codes ;-) You can find them here: http://sites.google.com/site/tomihasa/google-language-codes

Regards,
Platypus

Avatar
MateuszU

Community Member, 89 Posts

19 November 2010 at 10:46am

Hi,

I've put this into my _config.php and it seems to do the trick:

Translatable::set_default_locale('en_NZ');

Cheers
mat

Go to Top