mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
31 lines
643 B
Go
31 lines
643 B
Go
package routes
|
|
|
|
import (
|
|
"bugulma/backend/internal/handler"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// RegisterI18nRoutes registers i18n-related routes
|
|
func RegisterI18nRoutes(router *gin.RouterGroup, i18nHandler *handler.I18nHandler) {
|
|
if i18nHandler == nil {
|
|
return
|
|
}
|
|
|
|
i18n := router.Group("/i18n")
|
|
{
|
|
// UI translations
|
|
i18n.GET("/ui/:locale", i18nHandler.GetUITranslations)
|
|
|
|
// Data translations
|
|
i18n.GET("/data/:entityType/:entityID/:field", i18nHandler.GetDataTranslation)
|
|
|
|
// Locale information
|
|
i18n.GET("/locales", i18nHandler.GetSupportedLocales)
|
|
|
|
// Statistics
|
|
i18n.GET("/stats", i18nHandler.GetTranslationStats)
|
|
}
|
|
}
|
|
|