You can create an instance via the monster namespace new Monster.I18n.Locale()
.
<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
new Monster.I18n.Locale()
</script>
Alternatively, you can also integrate this class individually.
<script type="module">
import {Locale} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/i18n/locale.js';
new Locale()
</script>
RFC
A Language-Tag consists of:
langtag ; generated tag
-or- private-use ; a private use tag
langtag = (language
["-" script]
["-" region]
*("-" variant)
*("-" extension)
["-" privateuse])
language = "en", "ale", or a registered value
script = "Latn", "Cyrl", "Hant" ISO 15924 codes
region = "US", "CS", "FR" ISO 3166 codes
"419", "019", or UN M.49 codes
variant = "rozaj", "nedis", "1996", multiple subtags can be used in a tag
extension = single letter followed by additional subtags; more than one extension
may be used in a language tag
private-use = "x-" followed by additional subtags, as many as are required
Note that these can start a tag or appear at the end (but not
in the middle)