Skip to content

4.2.4 or 4.6.2 to note challenge of "en-us" and dot-property notation codeΒ #251

Closed
@azaroth42

Description

@azaroth42

Both descriptions of the language map pattern talk about the utility of using object.en as a method of accessing the data. However, neither mention the subsequent headache of "-region" or other BCP47 values beyond the simple two letter code for the language as a whole.

If I use "en-us" as the language of my string then I just broke everyone's dot-property notation code, as they'll try in vain to do:

text = object.occupation.en - us;

and hopefully get a 'Variable Not Defined: us' error, and at worst (if us is defined as something that can be subtracted from a string) some very badly broken content.

This should be in a note in one or both of the descriptions.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions