go-i18n is a Go package and a command that helps you translate Go programs into multiple languages. Supports pluralized strings for all 200+ languages in the Unicode Common Locale Data Repository (CLDR). Code and tests are automatically generated from CLDR data. Supports strings with named variables using text/template syntax. Supports message files of any format (e.g. JSON, TOML, YAML). Use goi18n extract to extract all i18n.Message struct literals in Go source files to a message file for translation. Create an empty message file for the language that you want to add (e.g. translate.es.toml). Run goi18n merge active.en.toml translate.es.toml to populate translate.es.toml with the messages to be translated. The goi18n command manages message files used by the i18n package.

Features

  • Loading translations from JSON or TOML files
  • Pluralization support
  • Interpolation of translations with variables
  • Formatting of numbers, dates, and currencies
  • Flexible message composition
  • Support for custom functions for message formatting

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow go-i18n

go-i18n Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of go-i18n!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Machine Translation Software

Registered

2023-01-23