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.

General Questions

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

Spell Checker


Reply

2 Posts   1101 Views

Avatar
suntrop

1 June 2010 at 12:34am Community Member, 131 Posts

It seems there is something wrong with the spell checker.
Although I placed ...

i18n::set_locale('de_DE');
i18n::set_default_lang('de_DE');
i18n::get_tinymce_lang('de_DE');


... into mysite/_config.php the TinyMCE UI is English and the spell checker checks for English grammar. But the little ABC icon shows me after a click "German (Germany)". Anyway it uses the English grammar and makes almost every word red underlined.

How can I change that?

Avatar
suntrop

1 June 2010 at 10:33pm (Last edited: 1 June 2010 10:35pm), Community Member, 131 Posts

It's not TinyMCE what's wrong but SS.
I wrote in cms/code/CMSMain.php:

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


... and it works fine. So these two lines don't do their job

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

Maybe a bug? Should I open a new ticket?

EDIT:
If i18n::set_locale('de_DE'); sets its value to de_DE how does this work with the HtmlEditorConfig what needs Deutsch=de?