package.esm2022.src.i18n.tokens.mjs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Angular - the core framework
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import { InjectionToken } from '../di/injection_token';
import { inject } from '../di/injector_compatibility';
import { InjectFlags } from '../di/interface/injector';
import { DEFAULT_LOCALE_ID, USD_CURRENCY_CODE } from './localization';
/**
* Work out the locale from the potential global properties.
*
* * Closure Compiler: use `goog.LOCALE`.
* * Ivy enabled: use `$localize.locale`
*/
export function getGlobalLocale() {
if (typeof ngI18nClosureMode !== 'undefined' &&
ngI18nClosureMode &&
typeof goog !== 'undefined' &&
goog.LOCALE !== 'en') {
// * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.
// * In order to preserve backwards compatibility, we use Angular default value over
// Closure Compiler's one.
return goog.LOCALE;
}
else {
// KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE
// COMPILE-TIME INLINER.
//
// * During compile time inlining of translations the expression will be replaced
// with a string literal that is the current locale. Other forms of this expression are not
// guaranteed to be replaced.
//
// * During runtime translation evaluation, the developer is required to set `$localize.locale`
// if required, or just to provide their own `LOCALE_ID` provider.
return (typeof $localize !== 'undefined' && $localize.locale) || DEFAULT_LOCALE_ID;
}
}
/**
* Provide this token to set the locale of your application.
* It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,
* DecimalPipe and PercentPipe) and by ICU expressions.
*
* See the [i18n guide](guide/i18n/locale-id) for more information.
*
* @usageNotes
* ### Example
*
* ```typescript
* import { LOCALE_ID } from '@angular/core';
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
* import { AppModule } from './app/app.module';
*
* platformBrowserDynamic().bootstrapModule(AppModule, {
* providers: [{provide: LOCALE_ID, useValue: 'en-US' }]
* });
* ```
*
* @publicApi
*/
export const LOCALE_ID = new InjectionToken(ngDevMode ? 'LocaleId' : '', {
providedIn: 'root',
factory: () => inject(LOCALE_ID, InjectFlags.Optional | InjectFlags.SkipSelf) || getGlobalLocale(),
});
/**
* Provide this token to set the default currency code your application uses for
* CurrencyPipe when there is no currency code passed into it. This is only used by
* CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.
*
* See the [i18n guide](guide/i18n/locale-id) for more information.
*
*
*
* **Deprecation notice:**
*
* The default currency code is currently always `USD` but this is deprecated from v9.
*
* **In v10 the default currency code will be taken from the current locale.**
*
* If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in
* your application `NgModule`:
*
* ```ts
* {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}
* ```
*
*
*
* @usageNotes
* ### Example
*
* ```typescript
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
* import { AppModule } from './app/app.module';
*
* platformBrowserDynamic().bootstrapModule(AppModule, {
* providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]
* });
* ```
*
* @publicApi
*/
export const DEFAULT_CURRENCY_CODE = new InjectionToken(ngDevMode ? 'DefaultCurrencyCode' : '', {
providedIn: 'root',
factory: () => USD_CURRENCY_CODE,
});
/**
* Use this token at bootstrap to provide the content of your translation file (`xtb`,
* `xlf` or `xlf2`) when you want to translate your application in another language.
*
* See the [i18n guide](guide/i18n/merge) for more information.
*
* @usageNotes
* ### Example
*
* ```typescript
* import { TRANSLATIONS } from '@angular/core';
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
* import { AppModule } from './app/app.module';
*
* // content of your translation file
* const translations = '....';
*
* platformBrowserDynamic().bootstrapModule(AppModule, {
* providers: [{provide: TRANSLATIONS, useValue: translations }]
* });
* ```
*
* @publicApi
*/
export const TRANSLATIONS = new InjectionToken(ngDevMode ? 'Translations' : '');
/**
* Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,
* `xlf` or `xlf2`.
*
* See the [i18n guide](guide/i18n/merge) for more information.
*
* @usageNotes
* ### Example
*
* ```typescript
* import { TRANSLATIONS_FORMAT } from '@angular/core';
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
* import { AppModule } from './app/app.module';
*
* platformBrowserDynamic().bootstrapModule(AppModule, {
* providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]
* });
* ```
*
* @publicApi
*/
export const TRANSLATIONS_FORMAT = new InjectionToken(ngDevMode ? 'TranslationsFormat' : '');
/**
* Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy
* that the compiler should use in case of missing translations:
* - Error: throw if you have missing translations.
* - Warning (default): show a warning in the console and/or shell.
* - Ignore: do nothing.
*
* See the [i18n guide](guide/i18n/merge#report-missing-translations) for more information.
*
* @usageNotes
* ### Example
* ```typescript
* import { MissingTranslationStrategy } from '@angular/core';
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
* import { AppModule } from './app/app.module';
*
* platformBrowserDynamic().bootstrapModule(AppModule, {
* missingTranslation: MissingTranslationStrategy.Error
* });
* ```
*
* @publicApi
*/
export var MissingTranslationStrategy;
(function (MissingTranslationStrategy) {
MissingTranslationStrategy[MissingTranslationStrategy["Error"] = 0] = "Error";
MissingTranslationStrategy[MissingTranslationStrategy["Warning"] = 1] = "Warning";
MissingTranslationStrategy[MissingTranslationStrategy["Ignore"] = 2] = "Ignore";
})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS9zcmMvaTE4bi90b2tlbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLGNBQWMsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQ3JELE9BQU8sRUF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