From d2a49fd14c82bb17fcc2256b9e85620a0807d3bd Mon Sep 17 00:00:00 2001
From: Fabian Steeg
- Following [[RFC9110]], services SHOULD use the
Examples of user-facing text in service responses are: the name of the service and the name of property configuration fields in the manifest, the name and description of entities, types and properties,
@@ -922,9 +927,9 @@ All objects used in this protocol (entities, types, properties, queries, candidates, features, etc.) MAY declare an explicit
- text-processing languge in a Data Extension Responses
Internationalization Considerations
Language Selection
+ Language of the intended audience
Accept-Language
header to let clients select the language in which user-facing text is returned.
- They SHOULD use the Content-Language
in their responses to expose the language each response is returned in.
+ Following [[RFC9110]], services SHOULD support the Accept-Language
header to let clients specify the preferred language in which user-facing text is returned. The language(s) requested by clients MUST be well-formed [[BCP 47]] language tags.
+ Services SHOULD use the Content-Language
header in their responses to expose the language(s) of the intended audience(s) of each response. Services MUST return valid (i.e. found in the [[IANA Language Subtag Registry]]) [[BCP 47]] tags.
Language Selection
Text-processing language
lang
field. The lang
value MUST be a single well-formed [[BCP 47]] language tag. This text-processing languge applies to the natural language fields of the object: name
, description
,
+ text-processing language in a lang
field. The lang
value MUST be a single valid (i.e. found in the [[IANA Language Subtag Registry]]) [[BCP 47]] language tag. This text-processing language applies to the natural language fields of the object: name
, description
,
query
(for reconciliation queries), v
and str
(for property values). Nested objects inherit the text-processing language of their parent, and can override it by setting their own lang
value
- (see example below). Client and service implementors SHOULD consider the text-processing languge to ensure correct processing of natural language content.
In the following example, we first set the text-processing language for a reconciliation query to en
, which is inherited by the first property, and overridden in the second property with zh-Hant
:
If no explicit text-processing language is given, the metadata language (the language of the intended audience) provided first (see service definition) is considered the default text-processing language.
+If no explicit text-processing language is given, the first language of the intended audience returned by the service is considered the default text-processing language.