jesseduffield/lazygit · error
Language not found: {{configLanguage}}
Error message
Language not found: {{configLanguage}} What it means
i18n.NewTranslationSetFromConfig accepts 'en' or any code present in the built-in languageCodes list; anything else returns this error. The configured gui.language must match a translation lazygit actually ships. 'en' is special-cased because English is the base set embedded in the binary.
Source
Thrown at pkg/i18n/i18n.go:47
}
}
// Detecting a language that we don't have a translation for is not an
// error, we'll just use English.
return EnglishTranslationSet(), nil
}
if configLanguage == "en" {
return EnglishTranslationSet(), nil
}
if slices.Contains(languageCodes, configLanguage) {
return newTranslationSet(log, configLanguage)
}
// Configuring a language that we don't have a translation for *is* an
// error, though.
return nil, errors.New("Language not found: " + configLanguage)
}
func newTranslationSet(log *logrus.Entry, language string) (*TranslationSet, error) {
log.Info("language: " + language)
baseSet := EnglishTranslationSet()
if language != "en" {
translationSet, err := readLanguageFile(language)
if err != nil {
return nil, err
}
err = mergo.Merge(baseSet, *translationSet, mergo.WithOverride)
if err != nil {
return nil, err
}
}
View on GitHub (pinned to c477a2959b)
Solutions
- Set gui.language to 'en' or to a supported code; check the languages documented in docs (e.g. 'de', 'fr', 'ja', 'zh-CN', 'nl', 'pl', 'ru').
- Restart lazygit after fixing the config.
- If you expected the language to exist, update lazygit — the translation list grows over releases.
Example fix
# before gui: language: 'enu' # after gui: language: 'en'
Defensive patterns
Strategy: validation
Validate before calling
// Before setting gui.language, check it against the shipped codes:
if language != "en" && !slices.Contains(languageCodes, language) {
return fmt.Errorf("unsupported language %q", language)
} Type guard
func isSupportedLanguage(code string, supported []string) bool {
return code == "en" || slices.Contains(supported, code)
} Prevention
- Consult the docs' language table before editing gui.language.
- Prefer 'en' over made-up codes; regional variants often aren't separate codes.
- Re-check after upgrades — available translations change between releases.
When it happens
Trigger: Setting gui.language in config.yml to a code that is not in languageCodes (e.g. 'zz', a regional variant like 'pt-BR' when only 'pt' exists, or a typo like 'enu').
Common situations: Manually editing config.yml after seeing a language name (not code) in docs; using a two-letter code for a language whose translation was removed or renamed between lazygit releases.
Related errors
- Feature not available for users using GPG. If you are using
- Feature not available for users using GPG. If you are using
- Unsupported git service
- While attempting to write back migrated user config to %s, a
- You should have an allBranchesLogCmds defined as a sequence!
AI-assisted analysis of jesseduffield/lazygit@c477a2959b (2026-08-15).
Data as JSON: /api/errors/58d54a3658ee5b91.
Report an issue: GitHub.