Article Language

This plugin is used for setting language and which direction the text is read, right-to-left (rtl) or left-to-right (ltr).

Currently supported languages

Writer's internal spellcheck and suggestion tool currently has support for the following languages:

Integrating your external spellcheck API

It's possible to write your own spellcheck/suggestion API, which the Writer will use if configured.

For more information about integrating your own API: See this guide.

Plugin configuration

{
  "id": "io.infomaker.articlelanguage",
  "name": "im-articlelanguage",
  "url": "https://plugins.writer.infomaker.io/v1/infomaker/im-articlelanguage/{PLUGIN_VERSION}/index.js",
  "style": "https://plugins.writer.infomaker.io/v1/infomaker/im-articlelanguage/{PLUGIN_VERSION}/style.css",
  "mandatory": false,
  "enabled": true,
  "data": {
    "languages": [
      {
        "label": "Svenska",
        "code": "sv_SE"
      },
      {
        "label": "English",
        "code": "en_GB"
      },
      {
        "label": "Arabic (Egypt)",
        "code": "ar_EG",
        "direction": "rtl"
      },
      {
        "label": "Polskie",
        "code": "pl_PL"
      },
      {
        "label": "Deutsch",
        "code": "de_DE"
      },
      {
        "label": "Deutsch (Österreich)",
        "code": "de_AT"
      },
      {
        "label": "Deutsch (Schweiz)",
        "code": "de_CH"
      },
      {
        "label": "Français",
        "code": "fr_FR"
      },
      {
        "label": "Íslensku",
        "code": "is_IS"
      },
      {
        "label": "Português",
        "code": "pt_PT"
      },
      {
        "label": "Spanish (Traditional)",
        "code": "es_ES"
      }
    ]
  }
}
Property Type Required Description
languages String true An array of activated/available languages

Language definitions

Each language definition should contain property to define label and code for language code.

Property Type Required Description
label String true The label to display inside the Writer
code String true The language code to match against/set in the article
"direction String false Set the direct of text, rtl (right to left) or ltr (left to right)

Backwards compatibility for existing articles

Existing articles and templates using two letter language codes on its idf@xml:lang-element.
(eg. "sv", "en", "fi"), needs the following object in the writer config to correctly
map to configured languages.

"languageFallbacks": {
  "sv": "sv_SE"
}
Property Type Required Description
languageFallbacks String false A list of old => new mapping for language codes

Output

The plugin manipulates the idf-element to reflect the language
of the content(newsItem > contentSet > inlineXML > idf).

<idf xmlns="http://www.infomaker.se/idf/1.0" xml:lang="sv-SE" dir="ltr">
  <!-- ... -->
</idf>