You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
// 5. Modify i18ntestinput.po using poedit as necessary
// Or msgfmt -c -v -o i18ntestinput.mo i18ntestinput.po
// 6. for d in "en_US"; do cp i18ntestinput.mo translations/test/$d/LC_MESSAGES/acsengine.mo; cp i18ntestinput.po translations/test/$d/LC_MESSAGES/acsengine.po; done
// 7. rm i18ntestinput.*
var (
locale = gotext.NewLocale("d", "l")
translator = &i18n.Translator{
Locale: locale,
}
world = "World"
resource = "Foo"
)
func aloha() {
translator.T("Aloha")
}
func foo() {
translator.T("Hello %s", world)
}
func bar() {
translator.NT("There is %d parameter in resource %s", "There are %d parameters in resource %s", 9, 9, resource)
}
func file() error {
return translator.Errorf("File not exists")
}
func api() error {
return translator.NErrorf("There is %d error in the api model", "There are %d errors in the api model", 3, 3)