{"record":{"id":"8d8260d5a86ddaf6","repo":"jesseduffield/lazydocker","slug":"language-not-found-language","errorCode":null,"errorMessage":"Language not found: {language}","messagePattern":"Language not found: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/i18n/i18n.go","lineNumber":31,"sourceCode":"// Localizer will translate a message into the user's language\ntype Localizer struct {\n\tLog *logrus.Entry\n\tS   TranslationSet\n}\n\nfunc NewTranslationSetFromConfig(log *logrus.Entry, configLanguage string) (*TranslationSet, error) {\n\tif configLanguage == \"auto\" {\n\t\tlanguage := detectLanguage(jibber_jabber.DetectLanguage)\n\t\treturn NewTranslationSet(log, language), nil\n\t}\n\n\tfor key := range GetTranslationSets() {\n\t\tif key == configLanguage {\n\t\t\treturn NewTranslationSet(log, configLanguage), nil\n\t\t}\n\t}\n\n\treturn NewTranslationSet(log, \"en\"), errors.New(\"Language not found: \" + configLanguage)\n}\n\nfunc NewTranslationSet(log *logrus.Entry, language string) *TranslationSet {\n\tlog.Info(\"language: \" + language)\n\n\tbaseSet := englishSet()\n\n\tfor languageCode, translationSet := range GetTranslationSets() {\n\t\tif strings.HasPrefix(language, languageCode) {\n\t\t\t_ = mergo.Merge(&baseSet, translationSet, mergo.WithOverride)\n\t\t}\n\t}\n\n\treturn &baseSet\n}\n\n// GetTranslationSets gets all the translation sets, keyed by language code\nfunc GetTranslationSets() map[string]TranslationSet {","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/jesseduffield/lazydocker/blob/7e7aadc2071d58031bf2daafca1fbd4093efc23f/pkg/i18n/i18n.go#L13-L49","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set gui.language to 'auto' to derive the language from the system locale.","Use the exact language code lazydocker ships (list the keys in pkg/i18n — e.g. 'en', 'nl', 'de', 'fr', ...); check for typos.","If you need the missing language, fall back to 'en' — that is what the code already does — and consider contributing a translation."],"exampleFix":"# before (config.yml)\ngui:\n  language: jp   # wrong code -> error\n\n# after (config.yml)\ngui:\n  language: ja   # or 'auto'","handlingStrategy":"validation","validationCode":"valid := false\nfor key := range i18n.GetTranslationSets() {\n    if key == cfg.Language {\n        valid = true\n        break\n    }\n}\nif !valid {\n    cfg.Language = \"auto\" // or \"en\"\n}","typeGuard":null,"tryCatchPattern":"set, err := i18n.NewTranslationSetFromConfig(log, cfg.Language)\nif err != nil {\n    // set is still valid English fallback; log and continue\n    log.Warn(\"unknown language, using English: \" + err.Error())\n}","preventionTips":["Use 'auto' unless you specifically need to override the system locale.","Copy language codes exactly from the i18n package's available sets.","Remember the returned set is a usable English fallback — you may log-and-continue rather than abort."],"tags":["i18n","configuration","localization","fallback"],"backgroundTag":null,"analyzedSha":"7e7aadc2071d58031bf2daafca1fbd4093efc23f","analyzedAt":"2026-08-15T09:51:48.093Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}