mirror of https://github.com/abpframework/abp
Merge pull request #4868 from abpframework/feat/4867
Added support for mapping of culture name to Angular locale file namepull/4882/head
commit
eedd1b9413
|
After Width: | Height: | Size: 19 KiB |
@ -1,4 +1,15 @@
|
||||
import { InjectionToken } from '@angular/core';
|
||||
import { ABP } from '../models/common';
|
||||
import differentLocales from '../constants/different-locales';
|
||||
|
||||
export const CORE_OPTIONS = new InjectionToken<ABP.Root>('CORE_OPTIONS');
|
||||
|
||||
export function coreOptionsFactory({
|
||||
cultureNameToLocaleFileNameMapping: localeNameMap = {},
|
||||
...options
|
||||
}: ABP.Root) {
|
||||
return {
|
||||
...options,
|
||||
cultureNameToLocaleFileNameMapping: { ...differentLocales, ...localeNameMap },
|
||||
} as ABP.Root;
|
||||
}
|
||||
|
||||
Loading…
Reference in new issue