diff options
author | Sem <sembrestels@riseup.net> | 2012-07-06 05:18:14 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-06 05:18:14 +0200 |
commit | 0381efbd3bb6f38d53250a488b121e2ae36bc290 (patch) | |
tree | 0774feb5a49d35341cc566c37c339608352d42c1 /mod/tinymce/start.php | |
parent | b2f46500941a2093734e7672a4de79aabd95b9fc (diff) | |
download | elgg-0381efbd3bb6f38d53250a488b121e2ae36bc290.tar.gz elgg-0381efbd3bb6f38d53250a488b121e2ae36bc290.tar.bz2 |
Refs #1852. Tinymce detects if site language is installed in its languages path.
Diffstat (limited to 'mod/tinymce/start.php')
-rw-r--r-- | mod/tinymce/start.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mod/tinymce/start.php b/mod/tinymce/start.php index 48625f456..6aba837e0 100644 --- a/mod/tinymce/start.php +++ b/mod/tinymce/start.php @@ -33,3 +33,15 @@ function tinymce_longtext_menu($hook, $type, $items, $vars) { return $items; } + +function tinymce_get_site_language() { + + if ($site_language = elgg_get_config('language')) { + $path = elgg_get_plugins_path() . "tinymce/vendor/tinymce/jscripts/tiny_mce/langs"; + if (file_exists("$path/$site_language.js")) { + return $site_language; + } + } + + return 'en'; +} |