@metreeca/core - v0.10.0
    Preparing search index...

    Function nameTag

    • Names the language identified by a language tag.

      Every subtag a tag carries is taken into account: the name reflects the language, script, region and variant subtags, while extension and private use subtags, which carry no name of their own, are ignored.

      Important

      Names are supplied by the JavaScript runtime: availability and wording vary with the platform and with the language the name is given in. Names are intended for display and must not be relied on as stable values for comparison or storage.

      Parameters

      • tag: string

        The language Tag identifying the language to be named

      • locale: string = "en"

        The language Tag identifying the language the name is to be given in; defaults to English; a well-formed tag the runtime doesn't support is replaced by the runtime default language

      Returns string

      The name of the language identified by tag, given in the language identified by locale, or tag as it stands if either tag isn't well-formed or no name is available