Closed tinhan closed 3 years ago
That's a good question. There are a few packages out there that will help with multiple languages. I took a quick look at https://github.com/nicksnyder/go-i18n and it looks pretty solid.
The documentation is a little confusing, but you'll want to create a T() function that is available in your templates. Then you can use the same function on any flash messages. You can have a variable in the config.json that specifies the translation or build in something that changes it dynamically.
Here is basic example: https://github.com/nicksnyder/go-i18n/issues/27#issuecomment-168387906
And more documentation: https://godoc.org/github.com/nicksnyder/go-i18n/i18n
Closing - info provided.
Hi i need to add i18n in your example gowebapp How to do that ?