Page Properties |
---|
|
YellowIn progress | Stakeholders | All back-end module developers |
---|
Outcome |
---|
Due date | Accept-Language HTTP header
|
---|
Created date | 2021-06-09 |
---|
Owner | |
---|
|
Note |
---|
|
This decision has been migrated to the Technical Council's Decision Log as part of a consolidation effort. See: DR-000012 - Localization parameter for back-end |
Background
To translate messages it returns a back-end API needs to know the locale of the client.
Example message: "No item with barcode {itemBarcode} exists", for details see https://wikifolio-org.folioatlassian.orgnet/wiki/display/I18N/How+To+translate+FOLIO
Example locale: de for German
...
For details see
Jira Legacy |
---|
server | System JiraJIRA |
---|
serverId | 01505d01-b853-3c2e-90f1-ee9b165564fc |
---|
key | FOLIO-3196 |
---|
|
While it may be possible that Stripes supports multiple ways to pass the locale FOLIO should agree upon a single way that all back-end modules should use.
This was discussed among front-end devs during multiple stripes-architecture meetings with conclusions in
Jira Legacy |
---|
server | System JIRA |
---|
columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution |
---|
serverId | 01505d01-b853-3c2e-90f1-ee9b165564fc |
---|
key | STRIPES-750 |
---|
|
, and then by the Tech Council on 2021-06-09 and 2021-06-16.Decision
- Back-end modules shall read the HTTP Accept-Language header, as specified in RFC-7231 Section 5.3.5, to determine the desired locale of the response.
- The value is case insensitive (e.g.
de
and DE
are equivalent). - Multiple values may be present in a comma-separated list.
- Values may use weights in the range 0-1 appended to each value to indicate preference.
- Values without a weight shall be considered 1.0.
- Values with equal weights shall be considered to be ranked in descending order of preference.
- e.g.
de, en-gb;q=0.8, en;q=0.7
- Values may optionally include subtags (e.g.
de-DE
).
- The default value
en-US
will be used when a request lacks an Accept-Language header. - Unspecified functionality should follow established precedent, e.g RFC-4646 (tags for identifying languages), RFC-7231 (HTTP Accept-Language header), ISO 639-1 (two-letter language codes), etc.