Jump to: navigation, search

Coding for translation using weblate

638 bytes added, 29 June
no edit summary
These are saved as translatable, context and comments attributes on an XML element.
<property name="label" translatable="yes" context="context" comments="comment">string</property>
== Addons ==
Third-party addons often need to provide their own message catalogs. To pull one in, use
this instead of the usual.
from gramps.gen.const import GRAMPS_LOCALE as glocale
_ = glocale.get_addon_translator(__file__).gettext
or if you need more than one retrieval function:
_translation = glocale.get_addon_translator(__file__)
_ = _translation.gettext
The addon translator is another instance of GrampsTranslation, so the rules for creating
translatable strings and for retrieving the translated values are the same as for internal modules.
See [[Addons_Development#Localization|Addons development]] for more details.

Navigation menu