rename I18n to I18nWeb

This commit is contained in:
Hamidreza Ghavami
2023-05-21 03:29:27 +04:30
parent 786a3ac992
commit d9b1b200ce
8 changed files with 46 additions and 46 deletions

View File

@@ -208,10 +208,10 @@ func (s *Server) initRouter() (*gin.Engine, error) {
}
// Apply locale middleware for i18n
webI18nFunc := func(key string, params ...string) string {
i18nWebFunc := func(key string, params ...string) string {
return locale.I18n(locale.Web, key, params...)
}
engine.FuncMap["i18n"] = webI18nFunc
engine.FuncMap["i18n"] = i18nWebFunc
engine.Use(locale.LocalizerMiddleware())
// set static files and template