Sample

    The code example is as follows:

    For more information, please refer to BCP47 Language Tag.

    • Interface definination: t(key: L10nKey, options?: StandardOption): L10nValue

    Here you can get the value of the current language with as the key.

    The code example is as follows:

    1. console.log(l10n.exists('test_key'))

    Returns the current language’s BCP47 Language Tag

    Get all available languages

    The code example is as follows:

    1. // ['zh-Hans-CN', 'en-US']

    Most languages follow a left-to-right reading convention, with the exception of some languages such as Arabic, where this method learns the of the incoming language