kubernetes: k8s.io/kubernetes/pkg/kubectl/util/i18n Index | Files

package i18n

import "k8s.io/kubernetes/pkg/kubectl/util/i18n"


Package Files


func Errorf Uses

func Errorf(defaultValue string, args ...int) error

Errorf produces an error with a translated error string. Substitution is performed via the `T` function above, following the same rules.

func LoadTranslations Uses

func LoadTranslations(root string, getLanguageFn func() string) error

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 Uses

func T(defaultValue string, args ...int) string

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.

Package i18n imports 9 packages (graph) and is imported by 384 packages. Updated 2019-04-12. Refresh now. Tools for package owners.