For the complete documentation index, see llms.txt. This page is also available as Markdown.
Adding a New Language
This guide will walk you through adding a new language translation to Madonne DOJ. Whether you want to add Spanish, German, Portuguese, or any other language, follow these steps.
Overview
Adding a new language involves:
Creating translation files
Translating all text strings
Configuring the script to use your language
Step-by-Step Guide
Step 1: Choose Your Language Code
Use the standard ISO 639-1 two-letter language code:
Language
Code
Spanish
es
German
de
Italian
it
Portuguese
pt
Dutch
nl
Polish
pl
Russian
ru
Turkish
tr
For this example, we'll add Spanish (es).
Step 2: Create Translation Files
You need to create the translation file in the production folder:
How to create it:
Navigate to /ui/locales/
Copy the existing en.json file
Rename the copy to es.json (or your language code)
Tip: Start with en.json as it's usually more up-to-date than fr.json.
Step 3: Translate the Content
Open your new es.json file and translate only the values, not the keys.
Translation Example
Before (English):
After (Spanish):
Important: Never modify the keys (left side), only translate the values (right side)!
Step 4: Full Translation Template
Here's a complete translation structure for reference:
Complete JSON Structure (click to expand)
Step 5: Configure Date Format
The DATE_FORMAT key controls how dates are displayed. Use the format that's common in your region:
Region
Format
Example
Europe
dd/MM/yyyy
25/12/2024
USA
MM/dd/yyyy
12/25/2024
ISO
yyyy-MM-dd
2024-12-25
Spanish example:
Step 6: Configure in config.lua
Update your config.lua to use the new language:
Step 7: Test Your Translation
Restart the script:
2. Open the tablet:
3. Check all sections:
Dashboard
Investigations
Documents
Warrants
Examinations
Records
Violations
Services
Look for:
Missing translations (English text appearing)
Truncated text (too long for buttons)
Special characters not displaying correctly
Context issues (wrong meaning)
Translation Checklist
Use this checklist to ensure complete translation:
Common Translation Keys
Here are the most important keys to translate:
User Actions
Section Names
Empty States
Tips for Quality Translation
Context Matters
Some words have different meanings in different contexts. View the interface to understand:
Is "Record" a verb (to record) or noun (a record)?
Is "File" a document or an action (to file)?
Is "Warrant" singular or can it be plural?
Keep It Concise
UI translations should be:
✅ Short and clear
✅ Easy to understand
✅ Consistent in terminology
❌ Not overly formal (unless appropriate)
❌ Not too long for buttons
Test on Different Screen Sizes
Some languages are more verbose than others:
German translations are typically 30% longer than English
Spanish translations are typically 20-25% longer
Make sure text doesn't overflow on smaller screens
Sharing Your Translation
If you've created a translation for a new language: