Coding for translation using weblate

From Gramps
Revision as of 16:08, 29 June 2021 by Nick H (talk | contribs) (Created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Coding guidelines to enable easy and correct translation of strings on the User Interface.


Gramps has always been internationalized (see: ) Therefore, all strings meant for the user should always be flagged for translation.

In order to be considered for inclusion in the official Gramps release, any piece of code must support internationalization. What this means is that the Python module must support translations into different languages. Gramps provides support to make this as easy as possible for the developer.

Adding a new language

To add a new language, navigate to the "gramps" component in Weblate and click on the Tools -> Start new translation menu option. Then select a language code. You need to be a Weblate administrator to do this.

Then the language code must be added to the LINGUAS file.

An entry must also be made in the _LOCALE_NAMES dictionary in the file.