projectTranslationUpdate()

Scans all panels and scripts from one project level and updates the translation file.

Synopsis

int projectTranslationUpdate(mapping options);

Parameters

Parameter Description
options

The mapping can have the following key(string)/datatype of value, all key/value pairs are optional:

  • "sourceLang"/string ... source language name, e.g. "en_US.utf8". If this is not given,"translationSourceLang" from the config will be used. If this is not defined there, auto-detect will be used.
  • "sourceLevel"/int ... source project level number (default: 1); The level number is the same as in e.g. getPath()
  • "targetLevel"/int ... target project level number (default: 1); The level number is the same as in e.g. getPath()
  • "verbose"/bool ... (default: false) if true, each file processed is printed with an INFO message in the logfile (via ErrHdl).

Return value

The function returns 0 in case of success, -1 on error.

Error

In case of an error (e.g. a panel can not be opened), no translation file will be updated.

Description

The function scans all panels and scripts from one project level and updates the <translations>.ts file in all /msg/ subdirectories it finds.

Assignment

Multi-language capability

Availability

CTRL