No description
Find a file
2025-10-09 12:51:53 +02:00
.github ci: Use go/code-sanity@v2 2025-09-05 00:45:26 +02:00
cmd Appease linter 2025-09-05 00:45:04 +02:00
testdata/po Tests for i18n modules 2023-07-19 09:58:42 +02:00
tools Fix module path of the tools module 2025-10-09 10:50:18 +02:00
.gitignore Ignore compiled binary output 2023-07-26 17:06:27 +02:00
.golangci.yaml Update golangci-lint to v2 and migrate its config 2025-09-05 00:43:30 +02:00
action.yaml Fix IFS which is only used when expanding a variable 2023-07-24 09:43:59 +02:00
CONTRIBUTING.md Add git/github temlates and refresh README 2023-07-20 13:35:16 +02:00
go.mod Bump Go version to 1.23.12 2025-10-09 10:51:05 +02:00
go.sum Move back to upstream gotext containing our fixes 2023-08-30 09:59:28 +02:00
i18n.go Remove hack to modify global storage object 2023-07-20 14:15:46 +02:00
i18n_test.go Fix windows CI job 2023-07-21 10:49:53 +02:00
LICENSE Initial commit 2023-06-15 17:44:28 +02:00
README.md Add git/github temlates and refresh README 2023-07-20 13:35:16 +02:00

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.