Preparing Content for Translation

CSV Download Options

CSV Files support three options for downloading translations:

Single Translated File for a Single Language

Available in dashboard or via API as with other file types.

Multiple Languages in a Single File by Row

  • Accessible via API by specifying a comma-separated list of locales for the locale parameter, or by specifying all. Row-based output is the default for multiple language download.
  • Outputs translations for multiple languages by creating an extra row for each locale.
  • For this option, it is recommended that you use the translation_language_path directive to specify an empty column to label the language of each row and the output_original_row directive to specify whether you wish the source language to be included in the download.

For more on directives, read our article on CSV.

Original File

# smartling.paths=3
# smartling.source_key_paths=1
# smartling.translation_language_path=4
# smartling.first_row_header=true

stringID, non-translatable text, translatable string, language
row1, untranslated text, string1(English),
row2, untranslated text, string2(English),

Translations

stringID, non-translatable text, translatable string, language
row1, untranslated text, string1(English), en-EN
row1, untranslated text, string1(German), de-DE
row1, untranslated text, string1(French), fr-FR
row2, untranslated text, string2(English), en-EN
row2, untranslated text, string2(German), de-DE
row2, untranslated text, string2(French), fr-FR

Multiple Locales in a Single File Column

By default, multi-language downloads are organized by row, but you can also choose to organize languages by column instead by using the translations_in_columns directive in the original file.

# smartling.translations_in_columns=true

This will cause downloaded files to create an additional column for each translated language immediately to the right of each translatable column. Translation columns are ordered alphabetically by locale code. The original string is always included in this download type.

Original File

# smartling.paths=3
# smartling.source_key_paths=1
# smartling.first_row_header=true
# smartling.translations_in_columns=true

stringID, non-translatable text, translatable string
row1, untranslated text, string1(English)
row2, untranslated text, string2(English)

Translations

stringID, non-translatable text, translatable string, de-DE, fr-FR
row1, untranslated text, string1(English), string1(German), string1(French)
row2, untranslated text, string2(English), string2(German), String2(French)


By default, Smartling labels languages for both row-based and column-based downloads using the locale code (e.g. en-EN, es-US, etc). You can choose alternative labels using the locales_map directive.

Opening your downloaded CSV file

If you are using program that is encoded with Unicode (or UTF-8) by default, then proceed to open the file as you would normally. In most cases, Microsoft Excel will be your default program for spreadsheet files. A simple double-click on your downloaded CSV could open your translated file in Excel with multiple corrupt characters. This is because Excel is not encoded with Unicode by default.

To open your CSV file safely in Excel, follow these steps;

1) Download translations from Smartling

2) Open a new blank workbook in Excel (separately)

3) In Excel, go to the Data tab, click From Text. Choose the translated CSV file from your local drive and click Get Data


Screenshot_2020-06-12_at_12.35.06.png

 

Depending on your version of excel, there is a series of steps to follow in a pop-up like this​​.

4) Ensure Delimited is selected

5) In the File Origin dropdown, scroll down and choose Unicode (UFT-8) > Next
​​
​​​​​​Screenshot_2020-06-12_at_12.48.56.png

6) Ensure the Delimiters are set to Comma > Next​​

Screenshot_2020-06-12_at_12.49.12.png

7) Ensure the Column data format is Text > Finish > OK


Screenshot_2020-06-12_at_12.49.21.png

Screenshot_2020-06-12_at_12.49.31.png

Was this article helpful?