Add New Language - aelassas/bookcars GitHub Wiki

This guide explains how to add support for a new language across all parts of the application: Backend, Admin Panel, Frontend, and Mobile App.

📌 Note: All language codes must follow the ISO 639-1 standard (e.g., en for English, fr for French, es for Spanish).

BookCars comes with built-in support for English, French, and Spanish. To add a new language, follow the instructions below.

Backend

  1. Add the new language ISO 639-1 code to LANGUAGES setting in backend/src/config/env.config.ts.
  2. Create a new file <ISO 639-1 code>.ts in src/lang folder and add the translations in it.
  3. Import and include your translations in src/lang/i18n.ts

Admin Panel and Frontend

  1. Add the new language ISO 639-1 code and its label in LANGUAGES setting in both:
    • admin/src/config/env.config.ts
    • frontend/src/config/env.config.ts
  2. Add the translations to:
    • admin/src/lang/*.ts
    • frontend/src/lang/*.ts.

Mobile App

  1. Add the new language ISO 639-1 code and its label in mobile/config/env.config.ts in LANGUAGES constant.
  2. Create a new file <ISO 639-1 code>.ts in mobile/lang folder and add the translations in it.
  3. Import and register your translations in mobile/lang/i18n.ts