id_translation#

Translation of IDs with flexible formatting and name matching.

For an introduction to translation, see Translation primer and Mapping primer.

Environment variables#

ID_TRANSLATION_DISABLED#

Global switch. When true, the Translator.translate()-method returns immediately.

Warning

When set, IDs are not converted to str. Type hints may be wrong.

ID_TRANSLATION_SUPPRESS_OPTIONAL_FETCHER_INIT_ERRORS#

Global switch. Set to true (not recommended) to allow the TranslatorFactory() to discard optional fetchers that raise when imported or initialized. See the documentation for details.

ID_TRANSLATION_VERBOSE#

Global switch. Set to true to overwrite the default ENABLE_VERBOSE_LOGGING value. Note that this variable is only read once (on module import). See the documentation for details.

Classes

Translator([fetcher, fmt, mapper, ...])

End-user interface for all translation tasks.

Modules

dio

Insertion and extraction of IDs and translations.

exceptions

General errors for the translation suite.

fetching

Fetching of translation data.

logging

Logging utilities; see Logging for help.

mapping

Shared API of the mapping processes (e.g. names to sources).

offline

Offline (in-memory) translation classes.

testing

Test implementations.

toml

Backend for the Translator.from_config() method.

transform

User-defined transformations of IDs and translations.

translator_typing

Types that are specific to the Translator implementation.

types

Types used for translation.

utils

Various supporting functions and classes.