Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David
tinymce
Commits
6fb938c8
Commit
6fb938c8
authored
Nov 23, 2015
by
Fabian Galinski
😾
Browse files
[BUGFIX] The tinyMce translation language keys are often not the same like the TYPO3 keys
parent
4b9d4f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Loader.php
View file @
6fb938c8
...
...
@@ -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
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment