Accessibility guidelines require that parts of a text in another language need a language attribute (http://www.w3.org/TR/WCAG20/#meaning-other-lang-id). With this attribute readspeakers can adapt to the right language. So in a wysiwyg-editor it would be great if editors can select a part of a text and give that selection the right language with a button.
For example:
This paragraph is in English , but...
Este apartado está en español.
Should be tagged like this:
<p lang="en-US">This paragraph is in English, but...</p>
<p lang="es">Este apartado está en español.</p>
See also the discussion http://groups.drupal.org/node/145894
As language of parts is a requirement for governmental websites and language will be part of the D8 efforts, this might be an issue to address.
Comments
Comment #1
mgiffordWith 10 wysiwyg editors supported in this I'd hope that one of them would have good support for handling languages within the body. In anycase, I'm looking forward to seeing how this type of functionality can be added.
Comment #2
hanno commentedI couldn't find a userfriendly editor for this. The solution I implemented is to use the 'attribute' button in ckeditor (and also included in tinymce (#594928: The 'Attribs' button is missing in TinyMCE). Users are able to fill in the language code in the lang attribute field.
It would be more userfriendly if there is a button 'language' or a button for some preferred languages ('english', 'french' etc), depending on the local language context.
See also solutions in Wordpress and typo3:
Wordpress: http://wordpress.org/extend/plugins/mce-accessible-language-change/
and http://wordpress.org/extend/plugins/accessibility-language/ (based on tinyMCE)
typo3: http://xinha.webfactional.com/browser/trunk/plugins/LangMarks
Comment #3
mgiffordThanks. I do hope that this is something that someone will be able to contribute fairly soon.
Comment #4
hanno commentedFYI found an old plugin for FCKeditor (Inline language switcher) http://sourceforge.net/tracker/?func=detail&aid=1729490&group_id=75348&a...
Comment #5
hanno commentedFYI posted a topic in the CKeditor forum for a language button: http://cksource.com/forums/viewtopic.php?f=11&t=22678
Comment #6
mgiffordGood to bring it back to CKeditor & TinyMCE. CKeditor especially has made comments on their accessibility.
Comment #7
hanno commentedFYI, the people of CKeditor added it now as a feature request for CKeditor: http://dev.ckeditor.com/ticket/7987
And yes, let's aim for CKeditor & TinyMCE for now. CKeditor is indeed aiming for WCAG (http://docs.cksource.com/CKEditor_3.x/Accessibility) so that gives a chance to get this feature in core.
Marking this issue as postponed as it is better to see the outcomes of that feature request.
Comment #8
mgiffordI ended up switching back to TinyMCE lately. I found that CKeditor just produced very messy HTML and I was always cleaning it up by hand.
I'm hoping that this gets fixed recently. I wasn't clear if CKeditor's team were aiming at ACAG compliance or WCAG as it is an authoring tool and the code it was producing wasn't very semantic.
Hopefully I just downloaded a bad version.
Comment #9
hanno commentedCKeditor has launched a language button plugin. They are welcoming reviews.
It can be downloaded and tested from http://cksource.com/forums/viewtopic.php?f=18&t=24902
Comment #10
SebCorbin commented@Hanno how do you install this plugin?
Comment #11
hanno commentedThis plugin is now published on Github: https://github.com/fredck/CKEditor-Languages-Plugin
You will find installation instructions there. In config.js you have to add two lines:
config.extraPlugins = 'languages';
config.languages = [ 'fr:French', 'es:Spanish', 'it:Italian' ];
I tested it and it works. Only issue I have is that I can't change the language list after installation, also not after clearing cache.
Comment #12
mgiffordtagging
Comment #13
mgiffordNice to see this is in CKEditor now
http://dev.ckeditor.com/ticket/7987#comment:30
http://ckeditor.com/demo#full