the comments added to public functions
This commit is contained in:
@@ -19,11 +19,13 @@ const (
|
||||
_domain = "graph"
|
||||
)
|
||||
|
||||
// Translate translates a string based on the locale and default locale
|
||||
func Translate(content, locale, defaultLocale string) string {
|
||||
t := l10npkg.NewTranslatorFromCommonConfig(defaultLocale, _domain, "", _localeFS, _localeSubPath)
|
||||
return t.Translate(content, locale)
|
||||
}
|
||||
|
||||
// NewTranslateLocation returns a function that translates a string based on the locale
|
||||
func NewTranslateLocation(locale, defaultLocale string) func(string, ...any) string {
|
||||
t := l10npkg.NewTranslatorFromCommonConfig(defaultLocale, _domain, "", _localeFS, _localeSubPath)
|
||||
return t.Locale(locale).Get
|
||||
|
||||
Reference in New Issue
Block a user