tauri-apps/tauri · error
Language {} not found. It must be one of {}
Error message
Language {} not found. It must be one of {} What it means
Panic in the WiX MSI bundler. After running candle on the fragments, it iterates the configured languages (bundle > windows > wix > language) and looks each one up in the language map built from WiX's built-in locales plus configured WiX extensions; an unknown language aborts the build with the full list of valid keys.
Source
Thrown at crates/tauri-bundler/src/bundle/windows/msi/mod.rs:832
// sign default extensions
if settings.windows().can_sign() {
for path in &fragment_extensions {
try_sign(path, settings)?;
}
}
for (path, extensions) in candle_inputs {
for ext in &extensions {
fragment_extensions.insert(ext.clone());
}
run_candle(settings, &wix_toolset_path, &output_path, path, extensions)?;
}
let mut output_paths = Vec::new();
for (language, language_config) in configured_languages.0 {
let language_metadata = language_map.get(&language).unwrap_or_else(|| {
panic!(
"Language {} not found. It must be one of {}",
language,
language_map
.keys()
.cloned()
.collect::<Vec<String>>()
.join(", ")
)
});
let locale_contents = match language_config.locale_path {
Some(p) => fs::read_to_string(p)?,
None => format!(
r#"<WixLocalization Culture="{}" xmlns="http://schemas.microsoft.com/wix/2006/localization"></WixLocalization>"#,
language.to_lowercase(),
),
};
View on GitHub (pinned to 52e4b6e71d)
Solutions
- Use one of the language codes listed in the panic message, with hyphen separators (e.g. 'en-US')
- For extension-backed languages, add the needed WiX extension to bundle > windows > wix > extensions and re-run
- Remove or fix the offending entry in the wix language configuration (map or array form)
Example fix
// before (tauri.conf.json)
"bundle": { "windows": { "wix": { "language": "en_US" } } } // panic: not in map
// after
"bundle": { "windows": { "wix": { "language": "en-US" } } } Defensive patterns
Strategy: validation
Validate before calling
// keep MSI languages to a vetted allowlist with hyphenated codes
const ALLOWED = new Set(['en-US', 'de-DE', 'fr-FR', 'ja-JP', 'zh-CN']);
const langs = wixLanguageIsArray ? wixLanguage : Object.keys(wixLanguage);
langs.forEach((l) => { if (!ALLOWED.has(l)) throw new Error(`unsupported MSI language: ${l}`); }); Prevention
- Always use BCP-47 style codes with a hyphen (en-US, not en_US)
- For extension-backed locales, add the WiX extension to the wix config before enabling the language
- Add new languages one at a time and let the panic's valid-list guide you
When it happens
Trigger: Configuring an MSI language that is not in the map: typos such as 'en_US' instead of 'en-US' (underscore vs hyphen), unsupported locales, or locales that require a WiX extension (e.g. ar-SA) that was not added under wix > extensions.
Common situations: See trigger scenarios.
Related errors
- Failed to setup custom handlebar template
- Failed to setup handlebar template
- Failed to create locale file
- failed to extract merge module filename
- failed to convert merge module filename to string
AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20).
Data as JSON: /api/errors/43fa771c2e53979e.
Report an issue: GitHub.