Creating Language Packs
This guide walks you through creating a complete language pack for Arsenal from scratch.
Prerequisites
Before starting:
- Arsenal installed
- Text editor (VS Code recommended for JSON)
- Basic understanding of JSON format
- Flag image for your language (64x64px recommended)
1: Create the Folder
Navigate to your Arsenal installation and create a new folder:
hd2arsenal/resources/locale/xx-XX/Replace xx-XX with your language and country codes:
xx= ISO 639-1 language code (lowercase)XX= ISO 3166-2 country code (uppercase)
Examples
| Language | Folder Name |
|---|---|
| German (Germany) | de-DE |
| French (France) | fr-FR |
| Spanish (Spain) | es-ES |
| Spanish (Mexico) | es-MX |
| Japanese | ja-JP |
| Korean | ko-KR |
| Portuguese (Brazil) | pt-BR |
| Russian | ru-RU |
| Polish | pl-PL |
2: Copy Template Files
Copy the contents of en-GB as your starting template:
en-GB/
├── _manifest.json
├── flag.png
└── translations/
├── dialogs.json
├── menus.json
├── misc.json
├── notifications.json
├── onboarding.json
├── settings.json
├── tutorials.json
└── ui.jsonCopy all these files to your new folder.
Note: This structure is a recommended starting point, but you can organize your translations differently. You can merge files, use different folder structures, or even use a single file—just make sure to update the
filesarray in_manifest.jsonaccordingly.
3: Update the Manifest
Edit _manifest.json with your language details:
{
"label": "Deutsch",
"languageCode": "de",
"countryCode": "DE",
"flag": "flag.png",
"files": [
"translations/notifications.json",
"translations/dialogs.json",
"translations/settings.json",
"translations/ui.json",
"translations/menus.json",
"translations/onboarding.json",
"translations/tutorials.json",
"translations/misc.json"
]
}Manifest Fields
| Field | Description | Example |
|---|---|---|
label | Display name in language selector | "Deutsch" |
languageCode | ISO 639-1, lowercase | "de" |
countryCode | ISO 3166-2, uppercase | "DE" |
flag | Path to flag image | "flag.png" |
files | Array of translation file paths | [...] |
Important: The
filesarray must include all translation files that contain your translations. You don’t need to follow the same file organization as official packs—you can organize translations in a single file or any structure you prefer, as long as all required keys are present and all files are listed in this array.
Finding Codes
- Language codes: ISO 639-1 List
- Country codes: ISO 3166-2 List
4: Replace the Flag
Replace flag.png with an appropriate flag image for your language/region.
Flag Requirements
| Property | Requirement |
|---|---|
| Format | PNG, JPEG, or WebP |
| Size | 64x64 pixels (recommended) |
| Aspect | Square preferred |
| Quality | Clear at small sizes |
Finding Flags
Recommended: Download flags from flagcdn.com using the convention:
https://flagcdn.com/w40/{countrycode}.pngReplace {countrycode} with your lowercase country code (e.g., it for Italy, de for Germany, fr for France).
Examples:
- Italian: https://flagcdn.com/w40/it.png
- German: https://flagcdn.com/w40/de.png
- French: https://flagcdn.com/w40/fr.png
5: Translate Files
Open each translation file and replace English text with your translations.
Translation Process
Original (English):
{
"navbar-label-home": "HOME",
"navbar-label-mod-management": "MOD MANAGEMENT",
"tooltip-deploy": "Deploy active mods"
}Translated (German):
{
"navbar-label-home": "STARTSEITE",
"navbar-label-mod-management": "MOD-VERWALTUNG",
"tooltip-deploy": "Aktive Mods bereitstellen"
}Translation Rules
- Keep keys unchanged — Only modify the values (right side)
- Preserve formatting — Keep uppercase/lowercase patterns
- Maintain placeholders — Keep
{variable}markers exactly as-is - Check JSON validity — No trailing commas, proper quotes
Handling Placeholders
Some strings contain placeholders:
{
"notification-mods-selected": "{count} mod(s) selected",
"dialog-copy-mods": "Copy {count} selected mod(s) to profiles"
}Keep placeholders in your translation:
{
"notification-mods-selected": "{count} Mod(s) ausgewahlt",
"dialog-copy-mods": "{count} ausgewahlte Mod(s) in Profile kopieren"
}6: Test Your Pack
- Save all files — Ensure valid JSON
- Restart Arsenal — Required to detect new packs
- Open Settings — Go to language selection
- Select your language — It should appear in the list
- Verify translations — Navigate the interface
Troubleshooting
Language Doesn’t Appear
Check manifest:
- Verify
_manifest.jsonexists - Ensure valid JSON syntax
- Confirm all required fields present
Check folder:
- Verify folder is in
resources/locale/ - Confirm folder name format
xx-XX
Missing Translations
Check files:
- Verify all files listed in manifest exist
- Ensure file paths match exactly
- Check JSON syntax in each file
Broken Characters
Encoding issues:
- Save files as UTF-8
- Avoid special encoding characters
- Test with common special characters
Placeholder Errors
Symptoms: {count} appears as literal text
Fix: Ensure placeholders are preserved exactly:
- Correct:
{count} - Wrong:
{ count },[count],%count%