ubuntu / go-i18n

i18n wrapper joining gettext support for Linux and Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to go-i18n

Code quality License Code coverage Reference documentation Go Report Card

This is the code repository for go-i18n, a go-text wrapper joining gettext support for Linux and Windows.

This package allows to transparently embeds local translation or lookup in system path for installed translations on both platforms. It also includes a composite Github action to update translation on any folder. It will initialize and loads translation, ready to be used by gotext.

For usage in your own project, please refer to the reference documentation.

Reusable github action

A reusable action will extract any translatable strings using gotext functions in your code. Those will generate an up to date <domain>.pot file in the destination directory. Any <locale>.po file inside this directory will then be refreshed with the new available translations.

Usage example:

To bootstrap a new locale, you can cp <domain>.pot <locale>.po and commit it.

Troubleshooting

The project is using the slog package from Go 1.21. You can increase the verbosity of your embedding code to have more logs printed.

Get involved

This is an open source project and we warmly welcome community contributions, suggestions, and constructive feedback. If you're interested in contributing, please take a look at our Contribution guidelines first.

  • to report an issue, please file a bug report against our repository, using a bug template.
  • for suggestions and constructive feedback, report a feature request bug report, using the proposed template.

Get in touch

We're friendly! We have a community forum at https://discourse.ubuntu.com where we discuss feature plans, development news, issues, updates and troubleshooting.

For news and updates, follow the Ubuntu twitter account and on Facebook.

About

i18n wrapper joining gettext support for Linux and Windows

License:MIT License


Languages

Language:Go 100.0%