Jump to:

517 Posts in 247 Topics by 260 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » Setting the spell checking language

Forum for content editors and CMS users.

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

Page: 1 2
Go to End
Author Topic: 5739 Views
  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Re: Setting the spell checking language Link to this post

    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

  • Platypus
    Avatar
    Community Member
    43 Posts

    Re: Setting the spell checking language Link to this post

    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

  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Re: Setting the spell checking language Link to this post

    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.

  • TF-35Lightning
    Avatar
    Community Member
    137 Posts

    Re: Setting the spell checking language Link to this post

    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

  • Platypus
    Avatar
    Community Member
    43 Posts

    Re: Setting the spell checking language Link to this post

    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

  • MateuszU
    Avatar
    Community Member
    89 Posts

    Re: Setting the spell checking language Link to this post

    Hi,

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

    Translatable::set_default_locale('en_NZ');

    Cheers
    mat

    5739 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.