Jump to:

521 Posts in 248 Topics by 263 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » TinyMCE language dropdown

Forum for content editors and CMS users.

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

Page: 1
Go to End
Author Topic: 1096 Views
  • Hypnus
    Community Member
    11 Posts

    TinyMCE language dropdown Link to this post


    I'm a newbie to Silverstripe and i tried to translate my site to german but cannot get it why i do not have the german language in the language dropdown of TinyMCE.

    My config file has:
    -------------------------- _config.php --------------------------------------------------------
    // Enable Translatable
    Object::add_extension('SiteTree', 'Translatable');
    Object::add_extension('SiteConfig', 'Translatable');

    // Default locale language

    // Enable locale
    // Set the default site locale

    // Define allowed locales overriding those present in i18n::$common_locales
    global $allowed_locales;
    $allowed_locales = array(
    'en_US' => array('English', 'English'),
        'de_DE' => array('German', 'Deutsch')
    i18n::$common_locales = $allowed_locales;

    I've added to my Page.php in the controller init function:

    if($this->dataRecord->hasExtension('Translatable')) {

    I've created a page but i don't have in the language dropdown the german option, only English.
    There is a dropdown combo with the languages in the sitetree panel but if i select the german language from there i have to create a new sitetree with different ID for the pages and the language selection does not work for that.

    Can anyone guide me to what i am doing wrong because i could not find anything regarding this in the forum on in the docs.

    Thank you in advance.


  • Hypnus
    Community Member
    11 Posts

    Re: TinyMCE language dropdown Link to this post

    OK, found the cause of the problem.
    (the previous edit was wrong so i modified it)

    The TinyMCE language dropdown is no longer supported in Silverstripe 2.4.3, now you should use the "Translations tab" of the page.

    My problem was that if i added a field to the Page class the translations tab disappears from the CMS.

    FIXED: In my case the problem was that when i added a property to the Page class i used the disable/enable CMSFieldsExtensions when i got the parents fields and that is not correct. Do NOT use then like so:

    $fields = parent::getCMSFields();

    just simply:

    $fields = parent::getCMSFields();

    will do it just fine.

    Thanks and sorry if i got anyone confused.

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.