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:
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.jsonfileRename the copy to
es.json(or your language code)
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:
Step 5: Configure Date Format
The DATE_FORMAT key controls how dates are displayed. Use the format that's common in your region:
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:
Test it thoroughly
Join our Discord - https://discord.gg/madonne
Share your translation - We can include it in future releases!
Get credited - Your name in the documentation
Troubleshooting
Text appears in English instead of my language
✅ Check the file name matches your
LocaleUisetting✅ Verify the JSON syntax is valid (no missing commas, brackets)
✅ Ensure the file is in the correct folder (
/ui/locales/)✅ Restart the script
Special characters don't display correctly
✅ Save the file with UTF-8 encoding
✅ Don't use HTML entities (use actual characters)
✅ Test with various special characters (é, ñ, ü, etc.)
JSON syntax errors
✅ Use a JSON validator (like jsonlint.com)
✅ Check for missing commas between items
✅ Ensure all quotes are properly closed
✅ Watch for trailing commas (not allowed in JSON)
Text is cut off in the UI
✅ Shorten the translation
✅ Use abbreviations where appropriate
✅ Check on different screen resolutions
Example: Complete Spanish Translation
Here's a real working example for Spanish:
Next Steps
After adding your language:
Configuration - Set up your server
Usage Guide - Learn the interface
Support - Get help if needed
Created a translation? Share it with the community on our Discord!
Last updated
Was this helpful?