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
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud Icon
Managed MySQL, PostgreSQL, and SQL Databases on Google Cloud

Get back to your application and leave the database to us. Cloud SQL automatically handles backups, replication, and scaling.

Cloud SQL is a fully managed relational database for MySQL, PostgreSQL, and SQL Server. We handle patching, backups, replication, encryption, and failover—so you can focus on your app. Migrate from on-prem or other clouds with free Database Migration Service. IDC found customers achieved 246% ROI. New customers get $300 in credits plus a 30-day free trial.
Try Cloud SQL 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