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
I believe that this application has been completely translated into English. Would we like to translate it into other languages, for example, using go-i18n library?...
package main
import (
"fmt""github.com/nicksnyder/go-i18n/v2/i18n""golang.org/x/text/language"
)
funcmain() {
bundle:=i18n.NewBundle(language.English)
bundle.LoadMessageFile("es.json") // Carga un archivo de traducción en español.localizer:=i18n.NewLocalizer(bundle, "es")
message, _:=localizer.Localize(&i18n.LocalizeConfig{
MessageID: "HelloWorld",
})
fmt.Println(message) // Imprime el mensaje traducido.
}
es.json:
{
"HelloWorld": "Hola Mundo"
}
If not, I think this issue could be closed. @jaimeph
English translation of comments, documentation, and literal strings
The text was updated successfully, but these errors were encountered: