#1852 closed Defect (fixed)
Set language in TinyMCE for i18n.
| Reported by: | brettp | Owned by: | sembrestels |
|---|---|---|---|
| Priority: | normal | Milestone: | Elgg 1.8.7 |
| Component: | TinyMCE | Version: | 1.8 |
| Severity: | minor | Keywords: | i18n, tinymce, language |
| Cc: | brettp, sembrestels@… | Difficulty: | moderate |
Description (last modified by brettp)
(Copied from http://trac.elgg.org/elgg/ticket/1012)
To make tinymce language sensitive , in tinymce/views/default/input/longtext.php
around line 38
tinyMCE.init({ ...
add:
language : "<?php echo get_current_language();?>",
And maybe for conveniance direct people to the language downloads: you can download tinymce language modules from http://tinymce.moxiecode.com/download.php
Change History (14)
comment:1 Changed 16 months ago by cash
- Milestone set to Needs Review
- Severity set to minor
- Version set to 1.7
comment:2 Changed 16 months ago by cash
not implemented
comment:3 Changed 13 months ago by brettp
- Description modified (diff)
- Difficulty set to trivial
- Milestone changed from Needs Review to Elgg 1.8.5
comment:4 Changed 13 months ago by brettp
- Difficulty changed from trivial to moderate
This is not trivial to add. TinyMCE doesn't fall back to a default language, so if your site language isn't English and you don't have the language pack, it breaks Tiny's UI.
Off the top of my head, what if we add an admin option to set the TinyMCE language and use that instead of the site's language elgg.config.language. Include a warning that you need to install a language pack (which involves downloading a file to the vendor dir.)
comment:5 Changed 11 months ago by cash
- Milestone changed from Elgg 1.8.6 to Elgg 1.8.7
comment:6 Changed 11 months ago by cash
I don't want to spend a lot of time on this one since we are replacing TinyMCE in Elgg 1.9. If we do this, lets do a variation of what Brett suggested:
Add an admin setting to TinyMCE turn on setting the language to the site language with a warning that they need to download and install the appropriate language pack (with a link to the language packs).
comment:7 Changed 11 months ago by sembrestels
- Owner set to sembrestels
- Status changed from new to assigned
comment:8 Changed 11 months ago by sembrestels
- Cc sembrestels@… added
- Keywords i18n, tinymce, language added
- Version changed from 1.7 to 1.8
Pull request: https://github.com/Elgg/Elgg/pull/294
The code checks for the languages automatically. If the language is installed, the TinyMCE is translated, no admin setting is needed.
What do you think?
comment:9 Changed 11 months ago by cash
Very nice!
comment:10 Changed 11 months ago by Sem
Refs #1852. Tinymce detects if site language is installed in its languages path.
Changeset: 0381efbd3bb6f38d53250a488b121e2ae36bc290
comment:11 Changed 11 months ago by Cash Costello
Refs #1852 adds readme with language instructions for TinyMCE
Changeset: 28e28ec8b23d8077194704ace9584fd4f742f2ce
comment:12 Changed 11 months ago by sembrestels
- Resolution set to fixed
- Status changed from assigned to closed
comment:13 Changed 11 months ago by Sem
Refs #1852. Tinymce detects if site language is installed in its languages path.
Changeset: 0381efbd3bb6f38d53250a488b121e2ae36bc290
comment:14 Changed 11 months ago by Sem
Refs #1852. Added admin notice on activate.
Changeset: 8e3a2760ef88077aa04dc1905f5bce0348bdb3d7

needs review to see if we have fixed this