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

You Might Also Like
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start 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