Functions | |
def | get_active_lang () |
def | get_full_lang_code (lang=None) |
def | get_primary_lang_code (lang=None) |
def | set_active_lang (lang_code) |
Variables | |
string | __active_lang = "en-us" |
def mycroft.util.lang.get_active_lang | ( | ) |
Get the active full language code (BCP-47) Returns: str: A BCP-47 language code, e.g. ("en-us", or "pt-pt")
Definition at line 20 of file scripts/mycroft/util/lang/__init__.py.
def mycroft.util.lang.get_full_lang_code | ( | lang = None | ) |
Get the full language code Args: lang (str, optional): A BCP-47 language code, or None for default Returns: str: A full language code, such as "en-us" or "de-de"
Definition at line 58 of file scripts/mycroft/util/lang/__init__.py.
def mycroft.util.lang.get_primary_lang_code | ( | lang = None | ) |
Get the primary language code Args: lang (str, optional): A BCP-47 language code, or None for default Returns: str: A primary language family, such as "en", "de" or "pt"
Definition at line 41 of file scripts/mycroft/util/lang/__init__.py.
def mycroft.util.lang.set_active_lang | ( | lang_code | ) |
Set the active BCP-47 language code to be used in formatting/parsing Args: lang (str): BCP-47 language code, e.g. "en-us" or "es-mx"
Definition at line 29 of file scripts/mycroft/util/lang/__init__.py.
|
private |
Definition at line 16 of file scripts/mycroft/util/lang/__init__.py.