Skip to content

Feature: I18n

Christopher Mark Fullarton requested to merge i18n into staging

This update will provide a consistent way through the whole application to display multiple languages. Currently supported is English and German.

The application sets the language with the following workflow:

  1. The default fallback language (English) is set
  2. If the user's browser defines a different language which is supported by the app this language will override the default language
  3. If the user decides to override the browser language by selecting one of the supported languages in the new /translate route this selection will override the browser language and is stored in the local storage. So when the user reenters the website, this setting will change the language again.

The language files are located under /arsnova.click/i18n/languageKey.i18n.json and should not be anywhere else.

If any translation contains html, it must be either rendered with jQuerys .html() function or by {{{ }}} in the spacebars template (note the 3 '{'s and '}'s) The spacebars helper is a underscore (e.g. {{_ "translate_key" }} and the javascript function is __ (Note the two ''s) - e.g. TAPi18n. __ ("translate_key")

See also the https://atmospherejs.com/tap/i18n

Merge request reports