Commit 6fb938c8 authored by Fabian Galinski's avatar Fabian Galinski

[BUGFIX] The tinyMce translation language keys are often not the same like the TYPO3 keys

parent 4b9d4f3d
......@@ -62,6 +62,29 @@ class Loader {
*/
static protected $init = FALSE;
/**
* That's a map, which contains the differences in relation to the tinyMce languages.
*
* @var array
*/
protected $typo3LanguagesDifferencesToTinyMceLanguagesMap = array(
'bg' => 'bg_BG',
'fr' => 'fr_FR',
'fr_CA' => 'fr_FR',
'kl' => 'gl',
'he' => 'he_IL',
'hi' => 'hi_IN',
'hu' => 'hu_HU',
'is' => 'is_IS',
'km' => 'km_KH',
'no' => 'nb_NO',
'pt' => 'pt_PT',
'sl' => 'sl_SI',
'sv' => 'sv_SE',
'th' => 'th_TH',
'zh' => 'zh_TW',
);
/**
* @param string $configuration file reference or configuration string (defaults to basic configuration)
* @param boolean $forceLanguage set this to true if you want to force your language set by the configuration
......@@ -102,6 +125,10 @@ class Loader {
$languageKey = $isoArray[$languageKey];
}
if (array_key_exists($languageKey, $this->typo3LanguagesDifferencesToTinyMceLanguagesMap)) {
$languageKey = $this->typo3LanguagesDifferencesToTinyMceLanguagesMap[$languageKey];
}
$languageFile = PATH_site . ExtensionManagementUtility::siteRelPath('tinymce') .
'Contrib/tinymce/langs/' . $languageKey . '.js';
if (!is_file($languageFile)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment