Localizador is a modern, cross-platform desktop application built with Flutter that streamlines the process of converting CSV translation files into Android-compatible strings.xml resources. Designed for localization teams, Android developers, and translators, Localizador offers an intuitive drag-and-drop interface.
localizador_usage.mp4
- Drag & Drop CSV Localization: Instantly import your translation CSV files by simply dragging and dropping them into the app.
- Automatic Android Resource Generation: Converts each language column in your CSV header into a proper
values-<lang>folder andstrings.xmlfile, following Android’s best practices. - Smart Data Handling: Only the columns defined in the CSV header are processed—extra columns in data rows are ignored, ensuring clean and accurate output.
- Key Replacement & Merging: Existing keys in
strings.xmlare updated with new translations, while untouched keys remain, making it safe for iterative localization. - Multi-Platform: Runs natively on Linux and Windows desktops.
- Recent Folders & Quick Access: Remembers your last used output folders for fast, efficient workflows.
- Safe XML Output: Handles special characters and ensures Android-compatible XML formatting.
-
Prepare your CSV: You can create the CSV file manually or use our Google Sheets template for a more automated workflow.
We've created a Google Sheet with a built-in script to help you translate and export your strings into a Localizador-compatible CSV file.
- Make a copy of the Localizador Google Sheet.
- Add your strings:
- In Column A, starting from row 2, paste your string keys (e.g.,
hello_world,welcome_message). - In the same column, add the English source text inside the XML tag (e.g.,
<string name="hello_world">Hello World</string>).
- In Column A, starting from row 2, paste your string keys (e.g.,
- Define languages: In Row 1, starting from Column B, enter the language codes you want to translate to (e.g.,
es,fr,de). - Translate: From the main menu, go to Translate & Export > Translate Data. The script will automatically fill in the translations using Google Translate.
- Export: Once ready, go to Translate & Export > Download as CSV. This will generate a CSV file perfectly formatted for Localizador.
If you prefer to create the CSV file yourself, ensure it follows this format:
- The first row must be a header:
key,es,fr,... - Each subsequent row must contain the string key in the first column, followed by its corresponding translations for each language.
-
Drag & Drop: Drop your generated CSV file into the Localizador app, or use the file picker to select it.
-
Select Output Folder: Choose your Android project's
resfolder (or any other folder where you want the output to be saved). -
Done! Localizador automatically creates or updates the
values-<lang>/strings.xmlfiles for each language defined in your CSV header.
Input CSV:
key,es,fr
hello,Hola,Bonjour
how_are_you,Cómo estás,Comment vas-tu
colors,"Rojo, amarillo, rosa","Rouge, jaune, rose"
Output:
-
res/values-es/strings.xml -
res/values-fr/strings.xmlres/values-es/strings.xmlwill contain:<?xml version='1.0' encoding='utf-8'?> <resources> <string name="hello">Hola</string> <string name="how_are_you">Cómo estás</string> <string name="colors">Rojo, amarillo, rosa</string> </resources>
Each file will contain the appropriate XML-formatted strings for its language.
- Save hours on manual copy-pasting and error-prone resource editing.
- Perfect for teams working with translators and multiple languages.
- Streamline your workflow using the provided Google Sheets template.
- Open source and easy to extend.
Localizador includes comprehensive automated tests to ensure reliability:
- Unit Tests: The core CSV processing logic is thoroughly tested with various scenarios including edge cases and error conditions.
- Test Coverage: Tests cover CSV validation, XML generation, file handling, special characters, and error scenarios.
To run the tests:
flutter test