serge-import

Serge

# `serge-import`

# NAME

serge-import - Import translations from already existing resource files

# SYNOPSIS

`serge import [configuration-files] [options]`

Where `[configuration-files]` is a path to a specific .serge file, or a directory to scan .serge files in. You can specify multiple paths as separate command-line parameters. If no paths provided, Serge will look up for .serge files in the current directory.

# DESCRIPTION

serge-import does the opposite of serge-localize: it scans previously generated localized resource files according to the rules in configuration files, and tries to import translations back into the database.

This is useful to initially import pre-existing translations before setting up an automated localization flow.

Note that for import to work, you don't need to create a separate Serge configuration file or a job: you need to setup Serge jobs for the primary workflow (localization), in each job specifying the path to output localized files using `output_file_path` parameter. Then make sure that the pre-existing localized files are located and named in accordance with that parameter, and serge-import will know where to find these files for importing.

# OPTIONS

--dry-run

  Just show a report, but do no actual import.

--lang=xx[,yy][,zz], --language=xx[,yy][,zz] --languages=xx[,yy][,zz]

  An optional comma-separated list of target languages

--disambiguate-keys

  If duplicate keys are found, don't exit but disambiguate them in the order of their presence. Use with care only when you are sure that the ordering and the number of ambiguous keys in all files (both original and localized) is the same, otherwise you might end up importing wrong translations for wrong keys.

--no-report

  By default, serge-import generates HTML reports, one per language, in the current directory with 'serge-import-report-xx.html' file names, where 'xx' is the language. It is strongly recommended to always review these reports, but one may skip generating report files by providing this option.

--debug

  Print debug output

# SEE ALSO

Part of serge suite.