-code block moved to documentation
@ -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)
@ -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:
/* webpackChunkName: "_locale-${locale}-js"*/
'@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();