Problem/Motivation

updated

Currently the language of the report uses English as the default language.

The API does indeed support a language parameter: https://github.com/SIWECOS/siwecos-business-layer/blob/develop/routes/ap...

However, a German translation is available.

We'll discuss the localization strategy with the Siwecos core team and come back to this issue.

Comments

hexabinaer created an issue. See original summary.

hexabinaer’s picture

Title: Make report language follow the back-end language » Report language should follow the back-end language
sanduhrs’s picture

Version: 1.1.0 » 1.1.x-dev

The URL has already been changed to only report in English for the time being:
https://git.drupalcode.org/project/siwecos/-/blob/1.0.x/src/SiwecosServi...

The API actually falls back to en if the given language is not available.
Nonetheless I'd want to first discuss what language codes would be possible, and then provide a mapping to what Drupal does.

In Drupal we mostly use two letter language codes, but as always, there are exceptions to the rule ;)
E.g. en, fr, de but also pt-br and zh-hans

hexabinaer’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

  • sanduhrs committed 1b8bc1a on 1.1.x
    Issue #3227385 by hexabinaer, sanduhrs: Report language should follow...
sanduhrs’s picture

Status: Postponed (maintainer needs more info) » Fixed

The functionality has been added:
https://git.drupalcode.org/project/siwecos/-/blob/1.1.x/src/SiwecosServi...

Giving /en returns English language.
Giving /de returns German language.
Giving anything else returns English language, unless the language identifier has been made available in the meantime.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.