The Arelle iXBRL Viewer allows Inline XBRL (or iXBRL) reports to be viewed interactively in a web browser. The viewer allows users to access the tagged XBRL data embedded in an iXBRL report.
Use built-in JS support for multi-lingual labels for languages, rather than including them in the viewer JSON.
Fixes #573
Reason for change
We currently include names for languages as part of the viewer JSON and only include them in a single language. This means that they're not translated as part of the i18n support.
Modern JS provides Intl.DisplayNames which can give us language labels in different languages.
Description of change
Get labels for languages using Intl.DisplayNames.
No longer include languages in the taxonomy data object.
New viewers will ignore the languages object if present.
Steps to Test
Open a viewer, check the list of languages shown on the settings menu. They should be displayed in the language of the current locale, but this can be overridden by specifying ?lang=XX as a query param, where XX is a language code. Where this is done, the language names should be translated.
Use built-in JS support for multi-lingual labels for languages, rather than including them in the viewer JSON.
Fixes #573
Reason for change
We currently include names for languages as part of the viewer JSON and only include them in a single language. This means that they're not translated as part of the i18n support.
Modern JS provides
Intl.DisplayNames
which can give us language labels in different languages.Description of change
Get labels for languages using
Intl.DisplayNames
.No longer include
languages
in the taxonomy data object.New viewers will ignore the
languages
object if present.Steps to Test
Open a viewer, check the list of languages shown on the settings menu. They should be displayed in the language of the current locale, but this can be overridden by specifying
?lang=XX
as a query param, whereXX
is a language code. Where this is done, the language names should be translated.review: @Arelle/arelle @paulwarren-wk