WAI Language Plugin
The WAI Language Plugin enables the editor to add language annotations to the content.
1 Overview
If you use a number of different languages on a page, the WAI Lang plugin makes it easy to add “lang” attributes to the parts of the content where are language changes.
2 Usage
Include the extra/wai-lang plugin in the plugin list of the Aloha-Editor.
Select the text you want to annotate and click the “Add language annotation” button.
Start typing the language name or code in the input field and select the desired entry.
The text is surrounded with a span-tag with a lang
attribute. As language code there will be the either the ISO 639‑1 two-letter code (default) or the ISO 639-2 three-letter code used.
<span class="aloha-wai-lang" lang="de" data-gentics-aloha-repository="wai-languages" data-gentics-aloha-object-id="de"> Guten Tag </span>
3 Components
- Add language annotation button
- Language annotation tab with input field for the language and a button to remove a annotation
4 Configuration
The WAI Language plugin provides the following configuration options:
Aloha.settings.plugins: { 'wai-lang': { iso639: 'iso639-1', // iso639-2 for three letter codes flags: false, // whether to show flags in the dropdown config: [ 'span' ], editables: { // Don't allow wai-lang in top-text '#top-text': [ ] } } };