Top 1.5% dependent packages on proxy.golang.org
Top 1.4% dependent repos on proxy.golang.org
Top 6.3% forks on proxy.golang.org
Top 1.2% docker downloads on proxy.golang.org
proxy.golang.org : github.com/gin-contrib/i18n
Package i18n ginI18nImpl is an implementation of the GinI18n interface, providing localization support for Gin applications. It uses the go-i18n library to manage and retrieve localized messages. Fields: - bundle: The i18n.Bundle containing the localization messages. - localizerByLng: A map of language tags to their corresponding localizers. - defaultLanguage: The default language tag to use for localization. - getLngHandler: A handler function to retrieve the language tag from the Gin context. Methods: - GetMessage: Retrieves a localized message based on the provided context and parameter. - MustGetMessage: Retrieves a localized message and returns an empty string if retrieval fails. - HasLang: Checks if a specific language is supported. - GetCurrentLanguage: Retrieves the current language based on the Gin context.. - GetDefaultLanguage: Retrieves the default language - SetBundle: Sets the i18n.Bundle configuration. - SetGetLngHandler: Sets the handler function to retrieve the language tag from the Gin context. - loadMessageFiles: Loads all localization files into the bundle. - loadMessageFile: Loads a single localization file into the bundle. - setLocalizerByLng: Sets the localizers for each accepted language. - newLocalizer: Creates a new localizer for a given language. - getLocalizerByLng: Retrieves the localizer for a given language. - getLocalizeConfig: Converts the parameter into an i18n.LocalizeConfig.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/gin-contrib/i18n
License: MIT
Latest release: 4 months ago
First release: about 3 years ago
Namespace: github.com/gin-contrib
Dependent packages: 17
Dependent repositories: 14
Stars: 95 on GitHub
Forks: 22 on GitHub
Docker dependents: 3
Docker downloads: 2,928
See more repository details: repos.ecosyste.ms
Last synced: 28 days ago