Available Language

type AvailableLanguage

This type governs the Default Language constant and the Language Option interface.

Its value is used in the App Component to:

  1. Set the lang attribute on the html element.

  2. Set the language using Transloco's setActiveLang.

It is also used in:

  1. app.config.ts to provide the list of availableLangs and the defaultLang to Transloco.

  2. transloco-loader.ts to mandate the same file name for translations.

available-language.type.ts
export type AvailableLanguage = 'ar' | 'en';

Last updated