{"record":{"id":"43fa771c2e53979e","repo":"tauri-apps/tauri","slug":"language-not-found-it-must-be-one-of","errorCode":null,"errorMessage":"Language {} not found. It must be one of {}","messagePattern":"Language (.+?) not found\\. It must be one of (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/tauri-bundler/src/bundle/windows/msi/mod.rs","lineNumber":836,"sourceCode":"  // sign default extensions\n  if settings.windows().can_sign() {\n    for path in &fragment_extensions {\n      try_sign(path, settings)?;\n    }\n  }\n\n  for (path, extensions) in candle_inputs {\n    for ext in &extensions {\n      fragment_extensions.insert(ext.clone());\n    }\n    run_candle(settings, &wix_toolset_path, &output_path, path, extensions)?;\n  }\n\n  let mut output_paths = Vec::new();\n\n  for (language, language_config) in configured_languages.0 {\n    let language_metadata = language_map.get(&language).unwrap_or_else(|| {\n      panic!(\n        \"Language {} not found. It must be one of {}\",\n        language,\n        language_map\n          .keys()\n          .cloned()\n          .collect::<Vec<String>>()\n          .join(\", \")\n      )\n    });\n\n    let locale_contents = match language_config.locale_path {\n      Some(p) => fs::read_to_string(p)?,\n      None => format!(\n        r#\"<WixLocalization Culture=\"{}\" xmlns=\"http://schemas.microsoft.com/wix/2006/localization\"></WixLocalization>\"#,\n        language.to_lowercase(),\n      ),\n    };\n","sourceCodeStart":818,"sourceCodeEnd":854,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-bundler/src/bundle/windows/msi/mod.rs#L818-L854","documentation":"When building the WiX MSI, every language configured under bundle.windows.wix.language must exist in the bundler's internal language map (which maps languages to WiX culture/LCID data). An unknown language key causes an unwrap_or_else panic listing all valid languages.","triggerScenarios":"bundle_project -> build_wix_app_installer encounters a tauri.conf.json wix.language key (e.g. a misspelled or unsupported language code like 'en' vs 'English', or a generic code where a specific culture is required) not present in language_map.","commonSituations":"Migrating or hand-editing tauri.conf.json and using a wrong language key ('en' instead of 'English'); copying ISO codes from other tools; adding a second MSI language the bundler's language_map doesn't cover.","solutions":["Use one of the languages listed in the panic message (the valid WiX culture names) in bundle.windows.wix.language","Fix typos: e.g. use \"English\" instead of \"en\", specific cultures instead of generic codes","Check the tauri-bundler version's supported language list if a historically valid language was removed/renamed"],"exampleFix":"// before (tauri.conf.json)\n\"wix\": { \"language\": { \"en-US\": null, \"zz\": null } }\n// after\n\"wix\": { \"language\": { \"en-US\": null, \"English\": null } }","handlingStrategy":"validation","validationCode":"const VALID = ['English','German','French','Italian','Spanish','Dutch','Portuguese','Polish','Russian','Japanese','Korean','SimpChinese','TradChinese','Czech','Danish','Norwegian','Swedish','Finnish','Greek','Hungarian','Turkish','Hebrew','Arabic','Thai'];\nfor (const lang of Object.keys(conf.bundle.windows.wix.language ?? {}))\n  if (!VALID.includes(lang)) throw new Error(`unknown WiX language: ${lang}`);","typeGuard":"function isValidWixLanguage(lang: string, languageMap: Set<string>): boolean {\n  return languageMap.has(lang);\n}","tryCatchPattern":null,"preventionTips":["Copy language keys exactly from the panic's allowed list (WiX culture names)","Prefer explicit cultures like en-US over bare ISO codes","Validate the wix section of tauri.conf.json in CI before running builds"],"tags":["tauri","msi","wix","configuration","panic"],"backgroundTag":"invalid-enum-value","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}