Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- LangTag.db_finalize()¶
- LangTag.db_get_extlang()¶
- Return type:
- LangTag.db_get_grandfathered()¶
- Return type:
- LangTag.db_get_lang()¶
- Return type:
- LangTag.db_get_redundant()¶
- Return type:
- LangTag.db_get_region()¶
- Return type:
- LangTag.db_get_relation()¶
- Return type:
- LangTag.db_get_script()¶
- Return type:
- LangTag.db_get_variant()¶
- Return type:
- LangTag.db_initialize()¶
- LangTag.db_set_val(val)¶
- Parameters:
val (
LangTag.DbVal
) –
- LangTag.ext_modules_load()¶
Load all of the modules on the system, including the internal accessor. This has to be invoked before processing something with #lt_extension_t. or
LangTag.db_initialize
() does.
- LangTag.ext_modules_unload()¶
Unload all of the modules already loaded.
- LangTag.iter_init(tmpl)¶
- Parameters:
tmpl (
LangTag.IterTmpl
) – a #LtItermpl_t- Returns:
the initialized iterator object.
- Return type:
Initialize the iterator with tmpl object. this function has to be called before performing any opperation with the iterator and
LangTag.Iter.finish
() when the iterator isn’t needed anymore.lt_lang_db *lang = lt_lang_db_new(); LtPointer *key, *val; LtIter *iter; iter = LT_ITER_INIT (lang); while (lt_iter_next(iter, &key, &val)) { /* do something with key and value */ } lt_iter_finish(iter);
- LangTag.list_free(data)¶
- Parameters:
data (
object
) – aLangTag.List
.
Frees all of the memory used by a
LangTag.List
.
- LangTag.tag_convert_from_locale(error)¶
- Parameters:
error (
LangTag.Error
orNone
) – aLangTag.Error
.- Returns:
a
LangTag.Tag
,None
if fails.- Return type:
Convert current locale to the language tag.
- LangTag.tag_convert_from_locale_string(locale, error)¶
- Parameters:
locale (
str
) – a locale stringerror (
LangTag.Error
orNone
) – aLangTag.Error
orNone
.
- Returns:
a
LangTag.Tag
,None
if fails.- Return type:
Convert locale to the language tag.