Help Center Import/Export
CSV Import - File Structure & Requirements

CSV Import - File Structure & Requirements

Last updated: 2 months ago
5 minute read
Yuliia Kovalchuk
Developer at SiteTran

ALL ARTICLES

Help Center

CSV Import - File Structure & Requirements

General Requirements

File Extension: The file must have a .csv extension.

File Format: The file should be structured with comma-separated values, the standard CSV format. Each row represents a phrase, its translations, and additional optional metadata (see example below).

Required Columns

  • source_term: This is the original phrase in the source language. It is mandatory and without it, the file will be rejected.

Optional Columns

Additional columns can be included to provide more context or metadata. These columns are optional, but they must follow a strict naming convention and format:

  • target_term_{{language_code}}: Translations for the phrase in specific languages.
  • translation_approved_{{language_code}}: Indicates whether the translation for a specific language is approved. Values must be Y (approved) or N (not approved).
  • translator_email_{{language_code}}: Email of the translator for the specific language.
  • translator_name_{{language_code}}: Name of the translator for the specific language.
  • phrase_lang_create_dtime_{{language_code}}: Creation date and time for the translation, in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ).
  • translation_flagged_{{language_code}}: Indicates whether the translation is flagged for review. Values are Y (flagged) or N (not flagged).
  • phrase_key: A unique identifier for each phrase.
  • tag_name: Identifies the HTML tag (e.g., div, span) where the phrase appears. Not language-specific.
  • attribute_name: Specifies the HTML attribute (e.g., class, id) where the phrase is located. Not language-specific.

Validation Rules

To ensure successful file validation and import, adhere strictly to the following guidelines. Incorrect or unsupported formatting will result in file rejection or data loss:

  1. Valid Language Codes: The system accepts language codes per the ISO 639-1 standard, optionally combined with country codes from the ISO 3166-1 Alpha-2 standard (e.g., fr, es-MX). Invalid codes result in validation errors.
  2. Coherence of Language-Specific Columns: Each language-specific column must have a matching target_term_{{language_code}} column with the same language code. Consistent alignment of language-specific data is required for data integrity.
  3. Datetime Format: Values for phrase_lang_create_dtime_{{language_code}} must be in ISO 8601 format. Minor deviations are acceptable, as long as they follow the intended structure, like using only the date (e.g., 2024-09-25) with midnight as the default time (2024-09-25T00:00:00.000Z).

Example of Valid CSV File

Below is an example CSV file with two original phrases, translations into French and Spanish, tag names, creation dates, and flagged statuses. This example is shown in both plain text and tabular format.

Plain Text Example:

"phrase_id","source_term","target_term_fr","target_term_es","tag_name","phrase_lang_create_dtime_fr","phrase_lang_create_dtime_es","translation_flagged_fr","translation_flagged_es"
326507,"Example phrase","Exemple de phrase","Frase de ejemplo","div","2024-09-25T10:50:06.000Z","2024-09-25T10:50:03.000Z","Y","N"
326512,"Example phrase two","Exemple de phrase deux","Frase de ejemplo dos","div","2024-09-25T16:01:03.000Z","2024-09-25T16:00:59.000Z","Y","N"

Table Example:

phrase_id source_term target_term_fr target_term_es tag_name phrase_lang_create_dtime_fr phrase_lang_create_dtime_es translation_flagged_fr translation_flagged_es
326507 Example phrase Exemple de phrase Frase de ejemplo div 2024-09-25T10:50:06.000Z 2024-09-25T10:50:03.000Z Y N
326512 Example phrase two Exemple de phrase deux Frase de ejemplo dos div 2024-09-25T16:01:03.000Z 2024-09-25T16:00:59.000Z Y N
Couldn't find what you were looking for?

In this article

Website Translation Made Easy