File Management
Managing translation files, uploading, downloading, and understanding file structures
File Management
This guide covers everything you need to know about managing translation files in MovaBase, from understanding different file structures to uploading and downloading your translations.
File-Based Mode
File-based mode organizes translations into separate files, creating a namespace-like structure. This is ideal for larger projects with many translations or multiple features.
File Structure Overview
In file-based mode, each language has its own folder containing translation files:
project-exports/
├── en/
│ ├── common.json
│ ├── auth.json
│ ├── dashboard.json
│ └── settings.json
├── es/
│ ├── common.json
│ ├── auth.json
│ ├── dashboard.json
│ └── settings.json
└── fr/
├── common.json
├── auth.json
├── dashboard.json
└── settings.jsonWhen to Use File-Based Mode
Choose file-based mode when:
- Your application has distinct translation files for different features
- You want to maintain separation between different parts of your app
- Multiple developers work on different features simultaneously
- Your project has 50+ translation keys
- You are migrating from an existing project with file-based organization
Creating New Files
To create a new translation file in file-based mode:
- Navigate to your project and access the Languages section in the sidebar
- Click on "Add File" button (folder icon with plus)
- Enter the file name (e.g., "navigation", "checkout")
- Click "Add" to create the file
- The file will be available in all configured languages
Use descriptive file names that clearly indicate the content. Good file names help team members understand what translations belong where without needing to search.
Editing File Names
You can rename files at any time to maintain organization:
- Navigate to the Languages section in the sidebar
- Find the file you want to rename in the language folders
- Click the edit button (pencil icon) next to the file name
- Enter the new file name in the dialog
- Click "Save" to apply the change
Renaming a file updates the file name for all languages. This change is reflected immediately in the translation interface.
Deleting Files
When a file is no longer needed, you can delete it:
- Navigate to the Languages section in the sidebar
- Find the file you want to delete
- Click the delete button (trash icon)
- Confirm the deletion when prompted
Deleting a file permanently removes all translations contained in that file across all languages. This action cannot be undone.
File Organization Tips
Best practices for organizing files in file-based mode:
NEEDS_MEDIA
Language-Based Mode
Language-based mode creates a single translation file for each language. This is simpler and works well for smaller projects.
Language Folder Structure
In language-based mode, each language has a single translation file:
project-exports/
├── en.json
├── es.json
└── fr.jsonEach JSON file contains all translations for that language.
When to Use Language-Based Mode
Choose language-based mode when:
- Your project is small with fewer translations
- You prefer a simple, flat structure
- You are starting a new project and want to keep things simple
- Your application loads all translations at once
- You have a single-page application
File Behavior in Language Mode
In language-based mode, files work differently:
Export Structure Differences
When exporting from language-based mode:
| Aspect | File-Based Mode | Language-Based Mode |
|---|---|---|
| Files per Language | Multiple files | Single file |
| Folder Structure | Nested by language | Flat structure |
| Best For | Large projects | Small projects |
| Organization | Feature-based | Key-based |
NEEDS_MEDIA
File Operations
MovaBase provides essential file operations to manage your translation workflow efficiently.
Upload Translation Files
The upload feature allows you to import existing translation files into MovaBase.
Upload Process
To upload a translation file:
- Navigate to your project and find the "Upload" button in the Languages section or sidebar
- Click the upload button (folder with up arrow icon)
- In the upload dialog, select the file from your computer
- Choose which language the file represents
- Click "Upload" to import the translations
Supported File Formats
MovaBase supports importing these file formats:
| Format | Extension | Platform | Description |
|---|---|---|---|
| JSON | .json | Web, Node.js, React Native | Most common format, key-value pairs |
| PO | .po | gettext, PHP, many systems | Standard localization format with plural support |
| iOS Strings | .strings (iOS/macOS format) | iOS, macOS applications | Native Apple format |
| Android XML | .xml | Android applications | XML resource format |
When you upload a file, MovaBase automatically parses it and creates or updates translations. Duplicate keys are updated, and new keys are added.
Upload Best Practices
Download Translation Files
The download feature allows you to export your translations in your preferred format.
Download Process
To download your translations:
- Navigate to your project and find the "Download" button in the Languages section or sidebar
- Click the download button (folder with down arrow icon)
- In the download dialog, select your preferred file format
- Choose to download as ZIP (recommended) or individual files
- The file will download to your computer
Download Format Selection
The download dialog lets you choose from available formats:
| Format | Extension | Best For | Features |
|---|---|---|---|
| JSON | .json | Web applications | Simple, widely supported |
| PO | .po | gettext-based systems | Includes compiled .mo file |
| iOS Strings | .strings | iOS/macOS format | Native Apple format |
| Android XML | .xml | Android apps | XML resource format |
Each format is optimized for its target platform. PO format includes both .po source file and compiled .mo binary file for production use.
Download Mode Effects
Your chosen download mode affects how files are structured in the ZIP:
NEEDS_MEDIA
Supported File Formats
MovaBase supports multiple file formats to ensure compatibility with your development stack.
JSON Format
JSON format is the most common translation format for web and JavaScript applications.
Structure
Key-value pairs with support for nested objects:
{
"welcome_message": "Welcome to our application!",
"auth": {
"login": {
"title": "Sign In",
"button": "Login"
}
}
}Benefits
- Human-readable and easy to edit
- Widely supported across frameworks
- Supports nested structures for organization
- Can be minified for production
PO Format
PO (Portable Object) format is the standard format for gettext-based localization systems.
Structure
Simple key-value pairs with optional plural forms:
msgid "welcome_message"
msgstr "Welcome to our application!"
msgid "one_item"
msgid_plural "%d items"
msgstr[0] "1 item"
msgstr[1] "%d items"Features
- Standard gettext format
- Supports pluralization rules
- Includes context comments for translators
- Automatic compilation to .mo binary format
PO format is ideal for PHP, Python, and many gettext-based systems. When you download PO, you also get a compiled .mo file ready for production use.
iOS Strings Format
.strings format is the native format for iOS and macOS applications.
Structure
Key-value pairs with quotes:
iOS .strings format uses a standard key-value structure:
/* Login Screen */
"login.title" = "Sign In";
"login.button" = "Login";
/* Dashboard */
"dashboard.welcome" = "Welcome to Dashboard";Features
- Native iOS format
- Supports comments for context
- Optimized for iOS localization
- Automatic folder structure (e.g., en.lproj/)
Android XML Format
XML format is the standard resource format for Android applications.
Structure
XML tags with string resources:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">My Application</string>
<string name="welcome_message">Welcome to our app!</string>
<string name="login_button">Login</string>
</resources>Features
- Standard Android resource format
- Supports XML escaping
- Optimized for Android build system
- Automatic values folder structure
File Format Selection Dialog
When you click download or upload, a dialog appears to select the file format.
Dialog Features
The format dialog provides:
| Component | Description |
|---|---|
| Format Grid | Visual cards showing all available formats with icons |
| Preview Area | Shows selected format name and extension |
| Download/Upload Button | Main action button |
Choosing the Right Format
NEEDS_MEDIA
File Organization Best Practices
Naming Conventions
| Convention | Good Example | Bad Example | Why It Matters |
|---|---|---|---|
| Lowercase | common.json | Common.json | Consistency |
| Underscores | user_profile.json | user profile.json | Readability |
| Descriptive | checkout_flow.json | page1.json | Clarity |
| No Spaces | authentication.json | auth.json | Technical compatibility |
File Size Management
Keep translation files between 50-200 keys for optimal performance. Larger files can be slower to load and edit. Consider splitting files that exceed 200 keys.
Version Control Integration
Troubleshooting
Common File Issues
Part 6 of 14 • File Management Complete
Next: Download and Export