Releases: nicksnyder/go-i18n
1.5.0
A new command has been added to goi18n.
goi18n constants generates a file of constants for each translation id.
e.g.
package R
// MyHeightInMeters is the identifier for the following localizable string template(s):
// one: "I am {{.Count}} meter tall."
// other: "I am {{.Count}} meters tall."
const MyHeightInMeters = "my_height_in_meters"Thanks @rodrigocorsi2!
1.4.0
1.3.0
Added plural support for all 200+ languages in the Unicode Common Locale Data Repository via code generation.
Added new APIs to inspect translations loaded into the default bundle
Thanks to those who contributed!
@dennisfaust @parkr @dalu
1.2.0
Template data may now be passed into a Tfunc as a struct (previously only maps were supported).
// These will print the same thing
fmt.Println(T("person_greeting", map[string]interface{}{"Person": "Bob"}))
fmt.Println(T("person_greeting", struct{ Person string }{Person: "Bob"}))New language support
- Thai (
th)
Thanks to those who contributed!
@parkr @ExUltima
1.1.0
Better support for short language tags
- If a user requests “zh” and there are no translations for that locale, then translations for “zh-hans” or “zh-hans-cn” will be used if available.
Added new APIs to retrieve the language associated with Tfunc
- TfuncAndLanguage
- MustTfuncAndLanguage
New language support
- Burmese (
my)
1.0.0
There haven't been any backward incompatible changes to the API for over a year now so I think it is time to call the current API stable.
Going forward, release numbers will follow semantic versioning.
Thanks to all who have contributed!