{"record":{"id":"910fa5e8b54135ad","repo":"angular/angular-cli","slug":"locale-data-for-locale-cannot-be-found-no-lo","errorCode":null,"errorMessage":"Locale data for '${locale}' cannot be found. No locale data will be included for this locale.","messagePattern":"Locale data for '(.+?)' cannot be found\\. No locale data will be included for this locale\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/angular_devkit/build_angular/src/utils/i18n-webpack.ts","lineNumber":80,"sourceCode":"  for (const [locale, desc] of Object.entries(i18n.locales)) {\n    if (!i18n.inlineLocales.has(locale) && locale !== i18n.sourceLocale) {\n      continue;\n    }\n\n    let localeDataPath = findLocaleDataPath(locale, localeResolver);\n    if (!localeDataPath) {\n      const [first] = locale.split('-');\n      if (first) {\n        localeDataPath = findLocaleDataPath(first.toLowerCase(), localeResolver);\n        if (localeDataPath) {\n          context.logger.warn(\n            `Locale data for '${locale}' cannot be found. Using locale data for '${first}'.`,\n          );\n        }\n      }\n    }\n    if (!localeDataPath) {\n      context.logger.warn(\n        `Locale data for '${locale}' cannot be found. No locale data will be included for this locale.`,\n      );\n    } else {\n      desc.dataPath = localeDataPath;\n    }\n\n    if (!desc.files.length) {\n      continue;\n    }\n\n    loader ??= await createTranslationLoader();\n\n    loadTranslations(\n      locale,\n      desc,\n      context.workspaceRoot,\n      loader,\n      {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/angular/angular-cli/blob/bb72145f9ab45aee29f523236b3a25cd0813a841/packages/angular_devkit/build_angular/src/utils/i18n-webpack.ts#L62-L98","documentation":"During i18n build configuration, if neither the full locale nor its primary-language fallback has locale data available, the CLI warns that no locale data will be included in the build for that locale, and the translation descriptor gets no dataPath.","triggerScenarios":"configureI18nBuild with a locale where findLocaleDataPath returns null for both the full tag and the lowercased first subtag (e.g. an unknown/custom locale like 'zz' or a misspelled ID).","commonSituations":"Typo'd locale codes in angular.json; custom synthetic locales; locales removed/renamed between Angular versions; using locale IDs Angular has no registry entry for.","solutions":["Correct the locale ID in your i18n configuration to one Angular supports (run e.g. by listing Angular's known locales).","Register the custom locale data with registerLocaleData from a locale data file before/at build configuration.","Remove the locale from the build if translations are not actually needed for it."],"exampleFix":"// before (angular.json)\n\"locales\": { \"de-DE\": \"src/locale/messages.de.xlf\" }\n// after\n\"locales\": { \"de\": \"src/locale/messages.de.xlf\" }","handlingStrategy":"validation","validationCode":"import localeDe from '@angular/common/locales/de';\nimport { registerLocaleData } from '@angular/common';\n// Verify locale resolves before adding to angular.json\nconst known = (await import('@angular/common/locales/global/README.md').catch(() => null)) !== null;\nif (!known) registerLocaleData(localeDe); // or fix the locale ID in angular.json","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cross-check every locale in angular.json i18n.locales against Angular's supported locale list.","Avoid typos by generating i18n configuration via schematics rather than hand edits.","Treat this warning as an error in CI builds to catch bad locale IDs early."],"tags":["angular","i18n","localization","configuration"],"backgroundTag":"locale-data-missing","analyzedSha":"bb72145f9ab45aee29f523236b3a25cd0813a841","analyzedAt":"2026-08-30T02:47:34.745Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}