Skip to main content

CSV Import

Azbox supports CSV (Comma-Separated Values) files for importing translations. CSV works similarly to Excel import but is lighter and easier to edit in any text editor.

When to Use CSV

  • 📝 Quick edits in a text editor
  • 🔄 Export from other tools or databases
  • 📧 Simple format for translators
  • 🤖 Generated from scripts or automation

File Format

CSV files must have:

  • Header row — Column names
  • Key column — Translation identifiers
  • Language columns — One per language

Basic Structure

keyword,en,es,fr
welcome,Welcome,Bienvenido,Bienvenue
login,Log In,Iniciar Sesión,Connexion
logout,Log Out,Cerrar Sesión,Déconnexion

Supported Column Names

Key column (pick one):

  • key / keyword
  • string / source
  • source text / source_text
  • id / string id / identifier

Language columns:

  • Must match your project's language codes exactly
  • Case-insensitive (en, EN, En all work)

Complete Example

translations.csv
keyword,en,es,fr,de
app_name,My App,Mi App,Mon App,Meine App
welcome_message,Welcome!,¡Bienvenido!,Bienvenue !,Willkommen!
login_button,Log In,Iniciar Sesión,Connexion,Anmelden
logout_button,Log Out,Cerrar Sesión,Déconnexion,Abmelden
settings,Settings,Configuración,Paramètres,Einstellungen
profile,Profile,Perfil,Profil,Profil
save,Save,Guardar,Enregistrer,Speichern
cancel,Cancel,Cancelar,Annuler,Abbrechen
delete,Delete,Eliminar,Supprimer,Löschen
confirm,Are you sure?,¿Estás seguro?,Êtes-vous sûr ?,Bist du sicher?

Handling Special Characters

Use quotes for values with commas or newlines:

keyword,en,es
greeting,"Hello, World!","¡Hola, Mundo!"
multiline,"Line 1
Line 2","Línea 1
Línea 2"
quoted,"She said ""Hello""","Ella dijo ""Hola"""

How to Import in Azbox

Step 1: Prepare Your CSV

Ensure your file has:

  • ✅ Header row with column names
  • ✅ A keyword or key column
  • ✅ Language columns matching your project

Step 2: Open Import Dialog

Click Import in your project dashboard.

Step 3: Select Format

Choose CSV (.csv) from the dropdown.

Step 4: Import File

Click Import and select your .csv file.

Step 5: Review Results

Azbox shows:

  • ✅ Keywords imported
  • 🌍 Languages detected
  • ⚠️ Warnings (missing values, unmatched columns)
  • ❌ Errors (if any)

What Gets Imported

ContentImportedNotes
Key column✅ YesUsed as keyword identifier
Language columns✅ YesOnly matching project languages
Empty cells⚠️ SkippedWarning generated
Unmatched columns⚠️ IgnoredColumns not in project
Quoted values✅ YesQuotes are removed

Multi-Language Import

Like Excel, CSV imports all languages at once:

keyword,en,es,fr
hello,Hello,Hola,Bonjour ← 3 languages imported together
goodbye,Goodbye,Adiós,Au revoir

Creating CSV Files

From Excel/Google Sheets

  1. Create your spreadsheet
  2. File → Save As / Download As → CSV

From Text Editor

keyword,en,es
hello,Hello,Hola
world,World,Mundo

Save with .csv extension, UTF-8 encoding.

From Code

import csv

translations = [
['keyword', 'en', 'es'],
['hello', 'Hello', 'Hola'],
['world', 'World', 'Mundo'],
]

with open('translations.csv', 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerows(translations)

Common Issues

"No language columns found"

Headers don't match project languages.

# ❌ Wrong
keyword,English,Spanish

# ✅ Correct
keyword,en,es

Encoding Problems

Save as UTF-8 to preserve special characters (ñ, é, ü, etc.).

Extra Spaces

Azbox trims whitespace, but avoid leading/trailing spaces in headers:

# ❌ Wrong (space before "es")
keyword,en, es

# ✅ Correct
keyword,en,es

Best Practices

  1. UTF-8 encoding — Always save as UTF-8
  2. No BOM — Avoid UTF-8 with BOM if possible
  3. Quote when needed — Use quotes for commas/newlines
  4. Match language codes — Use exact codes from your project
  5. Consistent structure — Same columns across files

CSV vs Excel

FeatureCSVExcel
File sizeSmallerLarger
Edit with text editor✅ Yes❌ No
Multiple sheets❌ No✅ Yes
Formatting❌ None✅ Yes
Special charactersNeed quotesAutomatic