Skip to content

How to Add a New Language

Rodri Sanchez edited this page Mar 28, 2025 · 1 revision

To support a new language in the app, follow the steps below.


1. Register the New Language in the App

File: src/components/App/App.constants.js

// Add the new BCP 47 language code (e.g., 'en-US', 'es-AR') to the APP_LANGS array
const APP_LANGS = ["ar-SA", "be-BY", "bn-BD", "newLangCode"];

2. Define Language Labels for the UI

File: src/components/Settings/Language/Language.messages.js

/* Add this block for the new language */
newLangCode: {
  id: 'cboard.components.Settings.Language.LanguageName',
  defaultMessage: 'LanguageName1'
}
  • Replace:
    • newLangCode with the ISO 639-1 language code (e.g., en-US)
    • LanguageName1 with the user-visible name (e.g., French)

3. Add a Default Translation Entry

File: src/translations/src/cboard.json

"cboard.components.Settings.Language.LanguageName": "LanguageName1"

4. Fetch Latest Translations from Crowdin

node ./scripts/crowdin-fetch-latest.js

Note: You must have the CROWDIN_API_KEY set in your environment variables.
If you don’t have access to it, please contact the project maintainer.