diff --git a/docs/en/UI/Angular/Localization.md b/docs/en/UI/Angular/Localization.md index eec4db0cb4..c8073585e1 100644 --- a/docs/en/UI/Angular/Localization.md +++ b/docs/en/UI/Angular/Localization.md @@ -219,7 +219,18 @@ If you see an error like this, you should pass the `cultureNameLocaleFileMap` pr See [all locale files in Angular](https://github.com/angular/angular/tree/master/packages/common/locales). +## Adding new culture +```js +//app.module.ts + +import { storeLocaleData } from '@abp/ng.core'; +import( +/* webpackChunkName: "_locale-your-locale-js"*/ +/* webpackMode: "eager" */ +'@angular/common/locales/your-locale.js' +).then(m => storeLocaleData(m.default, 'your-locale')); +``` ## See Also * [Localization in ASP.NET Core](../../Localization.md) diff --git a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts index be9e7184e5..b30b1e742b 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/initial-utils.ts @@ -101,14 +101,7 @@ async function defaultLocalErrorHandlerFn({ } if (isDevMode) { - console.error(`Cannot find the ${locale} locale file. You should add the code below to app.module: - -import { storeLocaleData } from '@abp/ng.core'; -import( -/* webpackChunkName: "_locale-${locale}-js"*/ -/* webpackMode: "eager" */ -'@angular/common/locales/${locale}.js' -).then(m => storeLocaleData(m.default, '${locale}'));`); + console.error(`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-new-culture`); } resolve();