to_locale
Turn a language name (en-us) into a locale name (en_US).
def to_locale(
language: string
) - > string
Turn a language name (en-us) into a locale name (en_US).
Parameters
| Name | Type | Description |
|---|---|---|
| language | string | The hyphenated language identifier to be converted into a locale format |
Returns
| Type | Description |
|---|---|
string | The formatted locale string using underscores and appropriate casing for the country or script code |