No Description

joeybloggs 2ae1b76324 Update README 9 years ago
examples 8f1bfb25f9 Merge branch 'master' into file-import-export 9 years ago
testdata 24854c6ac4 Add test + sure up logic 9 years ago
.gitignore 8c4ba43db1 Update Import & Export 9 years ago
LICENSE bad39931a4 test 1 for file import/export 9 years ago
README.md 2ae1b76324 Update README 9 years ago
benchmarks_test.go d72ff9453c up GetTranslator() and FindTranslator() functions to return if the translation was found 9 years ago
errors.go 1e10e4febb Made Error messages more explicit 9 years ago
import_export.go 24854c6ac4 Add test + sure up logic 9 years ago
import_export_test.go 1e10e4febb Made Error messages more explicit 9 years ago
logo.png 460f747984 update README + code cleanup 10 years ago
translator.go 8f1bfb25f9 Merge branch 'master' into file-import-export 9 years ago
translator_test.go c8d146629c Add full web examples 9 years ago
universal_translator.go c8d146629c Add full web examples 9 years ago

README.md

universal-translator

Project status Build Status Coverage Status Go Report Card GoDoc License Gitter

Universal Translator is an i18n Translator for Go/Golang using CLDR data + pluralization rules

Why another i18n library?

Because none of the plural rules seem to be correct out there, including the previous implementation of this package, so I took it upon myself to create locales for everyone to use; this package is a thin wrapper around locales in order to store and translate text for use in your applications.

Features

  • Rules generated from the latest CLDR data, v29
  • Contains Cardinal, Ordinal and Range Plural Rules
  • Contains Month, Weekday and Timezone translations built in
  • Contains Date & Time formatting functions
  • Contains Number, Currency, Accounting and Percent formatting functions
  • Supports the "Gregorian" calendar only ( my time isn't unlimited, had to draw the line somewhere )
  • Support loading translations from files
  • Exporting translations to file, mainly for getting them professionally translated
  • Code Generation for translation files -> Go code.. i.e. after it has been professionally translated
  • Tests for all languages, I need help with this, please see here

Installation

Use go get

go get github.com/go-playground/universal-translator

Usage & Documentation

Please see https://godoc.org/github.com/go-playground/universal-translator for usage docs

Examples:

Help With Tests

To anyone interesting in helping or contributing, I sure could use some help creating tests for each language. Please see issue here for details.

License

Distributed under MIT License, please see license file in code for more details.