Translations
January 6, 2026 ยท View on GitHub
Jotty uses next-intl for internationalization, providing a pretty flexible translation system.
How Translation Works
Translation System
- Locale Detection: The application determines the language in the following order: User's personally selected locale (in their user settings), the
DEFAULT_LOCALEenvironment variable, and finally defaulting toenif neither are set. This ensures that guest users (e.g., on the login page) see the application in your preferred default language before they log in. - Translation Loading: The corresponding JSON file is loaded from
app/_translations/ - Custom Overrides: If a custom translation file is added in your
config/directory and specified using theCUSTOM_TRANSLATION_FILEenvironment variable, it will be used instead of the default translations, allowing you to override specific strings. This should allow users who are not comfortable in making pull requests to still be able to have Jotty in their native language.
Creating Custom Translations
Option 1: Local Custom Translation File
You can create a custom translation file to override or extend the default translations without modifying the core files:
-
Create a custom translation file in the
config/directory (e.g.,config/custom-translations.json) -
Copy the structure from the base translation file you want to customize:
- View the English translation file for the complete structure
- You only need to include the keys you want to override, not the entire file
-
Enable your custom translations by setting the environment variable:
CUSTOM_TRANSLATION_FILE=custom-translations.json -
Restart the application for changes to take effect
Option 2: Create a New Language
To add a completely new language to the application:
-
Copy the English translation file:
cp app/_translations/en.json app/_translations/[language-code].jsonReplace
[language-code]with the appropriate ISO 639-1 language code (e.g.,frfor French,defor German,esfor Spanish) -
Translate all strings in the new file to your target language, make sure to keep the variable placeholders in english (e.g.,
{count}) -
Create a pull request with your new translation file
Contributing Translations
We welcome and encourage community translations! If you've translated the application into a new language, please consider contributing it back to the project.
Translation File Structure
The translation files are organized into logical sections:
common- Shared UI elements (buttons, labels, etc.)auth- Authentication and loginnotes- Notes featurechecklists- Checklists featuretasks- Task managementprofile- User profile and settings- And so on...
Please use common sense when creating new strings if you plan on creating new features.