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
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime Icon
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime

General-purpose, compute-optimized, or GPU/TPU-accelerated. Built to your exact specs.

Live migration and automatic failover keep workloads online through maintenance. One free e2-micro VM every month.
Try Free
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