VegansDeluxe.core.Translator package

Submodules

VegansDeluxe.core.Translator.Locale module

class VegansDeluxe.core.Translator.Locale.Locale(code: str)

Bases: object

add_data(data: dict) None
get_string(key: str) str | None

VegansDeluxe.core.Translator.LocalizedList module

class VegansDeluxe.core.Translator.LocalizedList.LocalizedList(elements, separator=', ')[source]

Bases: object

VegansDeluxe.core.Translator.LocalizedString module

class VegansDeluxe.core.Translator.LocalizedString.LocalizedString(key: str, format_queue=None)[source]

Bases: object

copy() Self[source]
format(*args, **kwargs) Self[source]
insert(line)[source]
localize(code: str = '')[source]
localize_args(args: tuple, kwargs: dict, code: str) tuple[list[str], dict[str, str]][source]
VegansDeluxe.core.Translator.LocalizedString.ensure_str(data: str | LocalizedList | LocalizedString, code: str) str[source]
VegansDeluxe.core.Translator.LocalizedString.ls

alias of LocalizedString

VegansDeluxe.core.Translator.Translator module

class VegansDeluxe.core.Translator.Translator.Translator(default_locale: str)

Bases: object

create_locale(code: str) Locale
get_locale(code: str) Locale
get_string(key: str, code: str = '')
load_folder(folder_path: str)
load_json(code: str, filepath: str)
update_locale(code: str, data: dict)

Module contents