Multi Language Add New Language
Create a New Language JSON File for French:
-
File Creation: Create a new JSON file to support the French language.
-
File Location: Save the file at
assets/i18n/fr-FR.json
. -
Add Content: Populate the JSON file with the appropriate language content for French (France).
// ----------------------------------------------------
// File: src/assets/i18n/fr-FR.json
// ----------------------------------------------------
{
"dashboard": "Tableau de bord",
"advance-table": "Tableau avancé",
"calendar": "Calendrier",
"task": "Tâche",
"chat": "Chatter",
"email": "E-mail",
}
Add French Language to Header Dropdown Menu:
-
Locate the File: Open the file
app/layout/widgets/translate.component.ts
. -
Modify the
listLang
Array: Add an entry for the French language to thelistLang
array in the file. -
Save the Changes: After updating the
listLang
array, save the file.
listLang = [
{ text: 'English', flag: 'assets/images/flags/us.svg', lang: 'en-US' },
{ text: 'Spanish', flag: 'assets/images/flags/spain.svg', lang: 'es-ES' },
{ text: 'German', flag: 'assets/images/flags/germany.svg', lang: 'de-DE' },
{ text: 'French', flag: 'assets/images/flags/french.svg', lang: 'fr-FR' },
];