{"record":{"id":"58d54a3658ee5b91","repo":"jesseduffield/lazygit","slug":"language-not-found-configlanguage","errorCode":null,"errorMessage":"Language not found: {{configLanguage}}","messagePattern":"Language not found: (.+?)\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/i18n/i18n.go","lineNumber":47,"sourceCode":"\t\t\t}\n\t\t}\n\n\t\t// Detecting a language that we don't have a translation for is not an\n\t\t// error, we'll just use English.\n\t\treturn EnglishTranslationSet(), nil\n\t}\n\n\tif configLanguage == \"en\" {\n\t\treturn EnglishTranslationSet(), nil\n\t}\n\n\tif slices.Contains(languageCodes, configLanguage) {\n\t\treturn newTranslationSet(log, configLanguage)\n\t}\n\n\t// Configuring a language that we don't have a translation for *is* an\n\t// error, though.\n\treturn nil, errors.New(\"Language not found: \" + configLanguage)\n}\n\nfunc newTranslationSet(log *logrus.Entry, language string) (*TranslationSet, error) {\n\tlog.Info(\"language: \" + language)\n\n\tbaseSet := EnglishTranslationSet()\n\n\tif language != \"en\" {\n\t\ttranslationSet, err := readLanguageFile(language)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\terr = mergo.Merge(baseSet, *translationSet, mergo.WithOverride)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/i18n/i18n.go#L29-L65","documentation":"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.","triggerScenarios":"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').","commonSituations":"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.","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."],"exampleFix":"# before\ngui:\n  language: 'enu'\n# after\ngui:\n  language: 'en'","handlingStrategy":"validation","validationCode":"// Before setting gui.language, check it against the shipped codes:\nif language != \"en\" && !slices.Contains(languageCodes, language) {\n    return fmt.Errorf(\"unsupported language %q\", language)\n}","typeGuard":"func isSupportedLanguage(code string, supported []string) bool {\n    return code == \"en\" || slices.Contains(supported, code)\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["config","i18n","localization"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}