Thank you for contributing translations to Droidspaces! This guide will help you translate the app into your language.
As a translator, you only need access to these two files:
values/strings.xml- All text strings used in the appvalues/plurals.xml- Plural forms (if present)
You need to know your language's ISO 639-1 code. Common examples:
- English:
en(default, no directory needed) - Spanish:
es - French:
fr - German:
de - Japanese:
ja - Chinese (Simplified):
zh-rCN - Chinese (Traditional):
zh-rTW - Arabic:
ar - Hindi:
hi - Russian:
ru - Sinhala:
si - Tamil:
ta
Where to find language codes:
- ISO 639-1 Language Codes, Link 2
- Android Locale Codes
- For region-specific variants:
{language}-r{REGION}(e.g.,zh-rCN,zh-rTW)
-
Create a directory named
values-{language_code}:- For Spanish:
values-es - For French:
values-fr - For Japanese:
values-ja - etc.
- For Spanish:
-
Copy the English files into your new directory:
- Copy
values/strings.xml→values-{language_code}/strings.xml - Copy
values/plurals.xml→values-{language_code}/plurals.xml(if it exists) - Important: After copying, remove
app_nameandapp_versionstrings from your translatedstrings.xmlfile - these are unified to the main file and must not be included in translations!
- Copy
Open your copied strings.xml file and translate all the text content. Keep everything else exactly the same!
Example:
<!-- English (values/strings.xml) -->
<string name="welcome_title">Welcome to Droidspaces</string>
<string name="get_started">Get Started</string>
<!-- Spanish (values-es/strings.xml) -->
<string name="welcome_title">Bienvenido a Droidspaces</string>
<string name="get_started">Comenzar</string>Important Notes:
- Keep "Droidspaces" untranslated in all languages - it's the project name and should remain as "Droidspaces" everywhere.
- Do NOT add
app_nameandapp_versionto your translated XML files - These strings are unified to the mainvalues/strings.xmlfile. You must completely remove them from your translated files - do not include them at all!
Submit your translated files via:
- Create a Pull Request
- Issue with attached files
- Or contact the maintainer directly
-
Keep all
nameattributes identical- The
name="..."part must match exactly between English and your translation - Only translate the text content inside the tags
- The
-
Preserve formatting placeholders
- Keep
%1$s,%1$d,%2$s, etc. exactly as they are - These are replaced by the app with actual values
- Example:
<!-- English --> <string name="container_status">Container %1$s is %2$s</string> <!-- Your translation (correct) --> <string name="container_status">Container %1$s ist %2$s</string> <!-- WRONG - don't change placeholders! --> <string name="container_status">Container %s ist %s</string>
- Keep
-
Use UTF-8 encoding
- Ensure your XML file starts with:
<?xml version="1.0" encoding="utf-8"?> - This is required for special characters (accents, non-Latin scripts, etc.)
- Ensure your XML file starts with:
-
Translate plurals.xml correctly
- If
plurals.xmlexists, translate all<item>entries - Keep the
quantityattributes (one,other,few,many, etc.) - Your language may have different plural rules than English
- If
- Don't change string names - The
name="..."attribute must stay identical - Don't change placeholders - Keep
%1$s,%1$d, etc. exactly as they are - Don't translate "Droidspaces" - Keep the project name "Droidspaces" as-is in all translations
- Don't add
app_nameandapp_versionto your translated XML files - These strings are unified to the mainvalues/strings.xmlfile. You must completely remove them from your translated files - do not include them at all! - Don't remove strings - Translate all strings, even if some seem unused (except
app_nameandapp_version- these must be completely omitted from translated files) - Don't add new strings - Only translate existing ones
- Don't change XML structure - Keep the same format and comments
After translation, your files should look like:
res/
├── values/ # English (default)
│ ├── strings.xml
│ └── plurals.xml
├── values-es/ # Spanish
│ ├── strings.xml
│ └── plurals.xml
├── values-fr/ # French
│ ├── strings.xml
│ └── plurals.xml
└── values-ja/ # Japanese
├── strings.xml
└── plurals.xml
- Context matters - Read comments in the XML file for context
- Be consistent - Use the same translation for the same English term throughout
- Ask questions - If something is unclear, ask the maintainer
- If you don't translate a string, the app will show English text (fallback)
- This won't crash the app, but users will see mixed languages
- Use proper Unicode characters for your language
- Ensure your text editor saves files as UTF-8
- Test that special characters display correctly
- Different languages have different plural rules
- English uses:
oneandother - Some languages need:
one,few,many,other - Research your language's plural rules and add all necessary forms
If you have questions or need help:
- Check this guide first
- Look at existing translations for examples
- Contact the project maintainer
Thank you for helping make Droidspaces available in more languages! 🌍