Portmod’s internationalization is handled using Project Fluent.
Localisation can be done using Portmod’s Weblate Project.
Localisation can also be done using our Pontoon instance: https://portmod-l10n.herokuapp.com/projects/portmod/. A GitLab account is necessary for authentication, but no further signup is necessary. Just log-in with your GitLab account and start localising.
If a language you would like to localise has not yet been set up in Pontoon, you can request that it be added by contacting the Portmod developers, either via opening an issue, via matrix or email (see the README for up to date communication information).
Pontoon has better support for Fluent than Weblate, however our Pontoon instance cannot send email notifications, and Weblate provides access to a larger community of software translators.
For Portmod Developers
Text displayed to the user should be output using the
function, and added to the source localisation file
Also see Good Practices for Developers
Internally, the localisation is done using fluent-rs and compiled into portmod’s rust extension. The localisations themselves are also compiled into the rust extension, so after adding localisations it is also necessary to either rebuild the rust extension or to build the extension in debug mode where it will read the files directly from the filesystem at runtime (see Developer Setup for Portmod).