Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( T TranslateFunc RESOURCE_PATH = filepath.Join("i18n", "resources") TRANSLATION_NOT_FOUND = "!!i18N_MESSAGE_NOT_FOUND!!" )
Functions ¶
Types ¶
type TranslateFunc ¶ added in v1.0.0
TranslateFunc returns the translation of the string identified by translationID. @see https://github.com/nicksnyder/go-i18n/blob/v1.3.0/i18n/bundle/bundle.go#L19
func MustTfunc ¶ added in v1.0.0
func MustTfunc(sources ...string) TranslateFunc
func Translate ¶ added in v1.0.0
func Translate(loc *i18n.Localizer) TranslateFunc
Translate returns a method based on translate method signature in v1.3.0. To allow compatability between v1.3.0 and v2.0+, the `messageId` and `args` parameters are processed to fit with the new Localize API method. @see https://github.com/nicksnyder/go-i18n/blob/v1.3.0/i18n/bundle/bundle.go#L227-L257 for more information on the translate method
Click to show internal directories.
Click to hide internal directories.