Jump to:

23023 Posts in 11882 Topics by 2830 members

General Questions

SilverStripe Forums » General Questions » EN GB Spell-checker option?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 510 Views
  • Spaghetti
    Avatar
    Community Member
    31 Posts

    EN GB Spell-checker option? Link to this post

    Hello,

    I'm trying out SilverStripe CMS and I'm struggling with one issue. When I installed SS on WAMP, I selected English (United Kingdom), so I was surprised to see that the spell checker defaulted to US English. I was even more surprised to see that it was the only option of the drop down list in the page editor.

    Having searched google and this forum, I found a hack to edit the config file so that UK English is the option in the drop down but this is all accademic anyway as the spell-checker seems to crash when I click on the link in both Chrome and Firefox.

    I notice that this forums edit box has a decent spell-checker and that it's even UK English (if you register as EN UK). So why can't Silver-stripe spell-checker work as well as the Silver Stripe forum edit box?

    This is a major bummer for me because being able to spell check your work is half of the benefit of using a CMS, IMHO. Hey ho.

    Any thoughts or suggestions on how to fix this? Welcome....

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: EN GB Spell-checker option? Link to this post

    For what it's worth now that SS3.0 is coming out...

    The issue is in CMSMain.php. around line 97:

    $langName = i18n::get_locale_name($this->Locale);
    HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', "+{$langName}={$this->Locale}");

    You need to change it into:

    $langName = i18n::get_locale_name($this->Locale);
    $langCode = i18n::get_lang_from_locale($this->Locale);
    HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', "+{$langName}={$langCode}");

       

    The google spellchecker won't work if it sends the lang as nl_NL or en_GB... it does when it's nl or en....

    510 Views
Page: 1
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.