Namespaces | Functions | Variables
mycroft.util.lang Namespace Reference

Namespaces

 common_data_en
 
 common_data_es
 
 common_data_pt
 
 format_common
 
 format_da
 
 format_de
 
 format_en
 
 format_es
 
 format_fr
 
 format_hu
 
 format_it
 
 format_nl
 
 format_pt
 
 format_sv
 
 parse_common
 
 parse_da
 
 parse_de
 
 parse_en
 
 parse_es
 
 parse_fr
 
 parse_it
 
 parse_pt
 
 parse_sv
 

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"
 

Function Documentation

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.

Variable Documentation

string mycroft.util.lang.__active_lang = "en-us"
private

Definition at line 16 of file scripts/mycroft/util/lang/__init__.py.



mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:41