Hello,
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
Translatable::set_default_locale("en_US");
// Enable locale
i18n::enable();
// Set the default site locale
i18n::set_locale('en_US');
// 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')) {
i18n::set_locale($this->dataRecord->Locale);
}
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.
Cristian.