Coding for translation using weblate
Coding guidelines to enable easy and correct translation of strings on the User Interface.
Gramps has always been internationalized (see: https://gramps-project.org/introduction-WP/2006/04/looking-back-over-5-years/ ) 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 grampslocale.py file.