jesseduffield/lazydocker · warning

Language not found: {language}

Error message

Language not found: {language}

What it means

NewTranslationSetFromConfig iterates the available translation sets, and when the configured language code matches none of them it still returns an English TranslationSet but pairs it with this error. It is a soft failure: the app remains usable in English while telling you your configured language is unsupported.

Source

Thrown at pkg/i18n/i18n.go:31

// Localizer will translate a message into the user's language
type Localizer struct {
	Log *logrus.Entry
	S   TranslationSet
}

func NewTranslationSetFromConfig(log *logrus.Entry, configLanguage string) (*TranslationSet, error) {
	if configLanguage == "auto" {
		language := detectLanguage(jibber_jabber.DetectLanguage)
		return NewTranslationSet(log, language), nil
	}

	for key := range GetTranslationSets() {
		if key == configLanguage {
			return NewTranslationSet(log, configLanguage), nil
		}
	}

	return NewTranslationSet(log, "en"), errors.New("Language not found: " + configLanguage)
}

func NewTranslationSet(log *logrus.Entry, language string) *TranslationSet {
	log.Info("language: " + language)

	baseSet := englishSet()

	for languageCode, translationSet := range GetTranslationSets() {
		if strings.HasPrefix(language, languageCode) {
			_ = mergo.Merge(&baseSet, translationSet, mergo.WithOverride)
		}
	}

	return &baseSet
}

// GetTranslationSets gets all the translation sets, keyed by language code
func GetTranslationSets() map[string]TranslationSet {

View on GitHub (pinned to 7e7aadc207)

Solutions

  1. Set gui.language to 'auto' to derive the language from the system locale.
  2. Use the exact language code lazydocker ships (list the keys in pkg/i18n — e.g. 'en', 'nl', 'de', 'fr', ...); check for typos.
  3. If you need the missing language, fall back to 'en' — that is what the code already does — and consider contributing a translation.

Example fix

# before (config.yml)
gui:
  language: jp   # wrong code -> error

# after (config.yml)
gui:
  language: ja   # or 'auto'
Defensive patterns

Strategy: validation

Validate before calling

valid := false
for key := range i18n.GetTranslationSets() {
    if key == cfg.Language {
        valid = true
        break
    }
}
if !valid {
    cfg.Language = "auto" // or "en"
}

Try / catch

set, err := i18n.NewTranslationSetFromConfig(log, cfg.Language)
if err != nil {
    // set is still valid English fallback; log and continue
    log.Warn("unknown language, using English: " + err.Error())
}

Prevention

When it happens

Trigger: Setting config `gui.language` (passed as configLanguage) to a code that is not a key in GetTranslationSets() — e.g. 'jp' instead of 'ja', a typo, or a language no community translation exists for yet. Note: 'auto' bypasses the check entirely.

Common situations: Hand-editing the config file with an incorrect ISO code; using a two-letter code where the set is registered under a different code; copying config between lazydocker versions where a translation was removed.

Related errors


AI-assisted analysis of jesseduffield/lazydocker@7e7aadc207 (2026-08-15). Data as JSON: /api/errors/8d8260d5a86ddaf6. Report an issue: GitHub.