package i18n
import "k8s.io/kubernetes/pkg/kubectl/util/i18n"
Index ¶
- func Errorf(defaultValue string, args ...int) error
- func LoadTranslations(root string, getLanguageFn func() string) error
- func T(defaultValue string, args ...int) string
Functions ¶
func Errorf ¶
Errorf produces an error with a translated error string. Substitution is performed via the `T` function above, following the same rules.
func LoadTranslations ¶
LoadTranslations loads translation files. getLanguageFn should return a language string (e.g. 'en-US'). If getLanguageFn is nil, then the loadSystemLanguage function is used, which uses the 'LANG' environment variable.
func T ¶
T translates a string, possibly substituting arguments into it along the way. If len(args) is > 0, args1 is assumed to be the plural value and plural translation is used.
Source Files ¶
i18n.go
- Version
- v1.14.1
- Published
- Apr 5, 2019
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 1 minute ago –
Tools for package owners.