translations.strings module¶
Provides translation functionality.
-
class
translations.strings.
LangStrings
(infile, encoding='utf_8')[source]¶ Bases:
dict
Dictionary class used to store all strings for a plugin.
-
class
translations.strings.
TranslationStrings
[source]¶ Bases:
dict
Stores and get language strings for a particular string.
-
get_string
(language=None, **tokens)[source]¶ Return the language string for the given language/tokens.
-
tokenized
(**tokens)[source]¶ Create a new TranslationStrings instance and store tokens in it.
Parameters: tokens (dict) – Tokens to store in the instance. Returns: New TranslationStrings instance with tokens stored in it. Return type: TranslationStrings
-