angular-docs-cn/aio/content/examples/i18n/doc-files/app.locale_data.ts

8 lines
242 B
TypeScript

// #docregion import-locale
import { registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/locales/fr';
// the second parameter 'fr' is optional
registerLocaleData(localeFr, 'fr');
// #enddocregion import-locale