Arelle / ixbrl-viewer

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.
Other
97 stars 60 forks source link

Switch to using Intl.DisplayNames #640

Closed paulwarren-wk closed 7 months ago

paulwarren-wk commented 7 months ago

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.

review: @Arelle/arelle @paulwarren-wk

aviary-wf commented 7 months ago

Security Insights

No security relevant content was detected by automated scans.

Action Items