CSV

Languine supports CSV (Comma-Separated Values) files for simple translation management. This format is ideal for spreadsheet-based workflows and easy integration with external translation tools.


Setting Up

First, make sure you've got a languine.json config file in your project root. Here's an example:

typescript
{
  "locale": {
    "source": "en",
    "targets": ["sv", "de", "fr"]
  },
  "files": {
    "csv": {
      "include": ["translations/[locale].csv"]
    }
  }
}

Translating

With your config set, run:

typescript
npx languine@latest translate

When you run this command, Languine will:

  • Load your source CSV file (e.g., translations/en.csv)
  • Detect any new or modified translation strings
  • Generate translations for your target languages
  • Create or update the target language CSV files (e.g., translations/sv.csv)
  • Maintain column structure and formatting
  • Preserve any additional metadata columns