aas-specs
aas-specs copied to clipboard
Clarification Request Regarding Language Tags Constraints
In Specification Part 1, there is information regarding language tags as follows: "RDF requires IETF BCP 47[20] language tags. Simple two-letter language tags for locales like "de" conformant to ISO 639-1 are allowed, as well as language tags plus extension like "de-DE" for country code, dialect, etc. like in "en-US" for English (United States) or "en-GB" for English (United Kingdom). IETF language tags are referencing ISO 639, ISO 3166 and ISO 15924."
Could you please provide more specific details about these requirements? Have I understood correctly that language tags must adhere to the IETF BCP 47 standard with certain restrictions? Are these restrictions as follows:
- The
langtag
must correspond to ISO 639-1. - Only two-letter language tags are allowed + optional extensions
script
andregion
, which must comply to ISO 15924 and ISO 3166. So, are tags like "de-Latn" or "de-Latn-DE" also allowed?
If this is the case, could you please formalize an AASd-Constraint that outlines the limitations of language tags in AAS?
Discussion in Workstream Specifications AAS:
- Part 1 requests definition of rdf:langstring, so no additional definition or constraint needed
- in Schema validation of allowed values might be helpful but maintenance really hard. We recommend to use existing services to choose valid language tags. Instead of enumeration also regEx for structure could be added to schema.
https://www.rfc-editor.org/rfc/rfc5646, extract:
langtag = language
["-" script]
["-" region]
*("-" variant)
*("-" extension)
["-" privateuse]
There is a constraint requesting English Language: Constraint AASc-002: Data¬Specification¬IEC61360-/preferredName shall be provided at least in English
In this case we recommend/request alternative 1: "en" alternative 2: "en*" (i.e. en-US, en-xxx-US etc.), i.e. start with "en" alternative 3: Constraint sufficient as it is
Decision:
- for rdf:langstring - no additional constraints needed/no additional constraints will be added in Part 1. rdf:langstring is the source of definition. - for schema: is already supported in V3.0, regEx availabel (see https://github.com/aas-core-works/aas-core-meta/blob/87e8fbfeb51afdb295dac0975ee0924205c2f5bd/aas_core_meta/v3.py#L275)
- for AASc-002: Constraint AASc-002: Data¬Specification¬IEC61360-/preferredName shall be provided at least in English, i.e. languageTag equal to "en" or to any other valid language tag for English language
Bugfix: Constraint AASc-002 shall be renamed to Constraint AASc-3a-002 to be consistent wiht other constraints in document.