This documentation supports the 23.3 version of BMC Helix Innovation Suite (AR System and BMC Helix Innovation Studio).

To view an earlier version, select the version from the Product version menu.

Using the CLI to localize your application

If you run batch files or you run programs in the background, you can export localization package definition files, import translated XLIFF files, and create or update content in an application with a command-line interface (CLI).

With the CLI, you can run only one operation at a time. For the syntax of each operation, see To localize your application with the CLI.

The localization toolkit CLI supports the parameters listed in the following table:

Parameters for the localization toolkit CLI

ParameterDescription
-data "workSpaceLocation "Specifies the workspace.
-x "serverName "Specifies the server to log on to.
-u "user "Specifies the user account. This parameter is required with each command.
-p "password "Specifies the password for the user account. Omit the option if the user account has no password.
-w "authenticator "Specifies the name of an external authentication string or Windows domain. This is related to the Login window Authentication field. For more information, see Setting external authentication options.
-portnum "portNumber "Specifies the TCP port number used to log on when the portmapper is turned off.
-ldx "localizationDatabaseServer "

Specifies the server name when the localization database is configured on an AR System server.

Note

To use an AR System server as the localization database, you must set up the database on that server. For more information, see Setting a root folder.

-ldu "localizationDatabaseUser "Specifies the user account on the localization database server. Use this parameter when the -ldx parameter is used.
-ldp "localizationDatabasePassword "Specifies the password for the user account on the localization database server. Use this parameter when the -ldx parameter is used, but you can omit the option if the user account has no password.
-ldw "localizationDatabaseAuthenticator "Specifies the name of an external authentication string or Windows domain. This is related to the Login window Authentication field. For more information, see Setting external authentication options. Use this parameter when the -ldx parameter is used.
-ldportnum "localizationDatabasePortNumber "Specifies the TCP port number used to log on when the portmapper is turned off on the localization database server. Use this parameter when the -ldx parameter is used.
-d "definitionFilePath "Specifies the file path to the localization package definition file that you created. For more information, see Creating a localization package definition.
-extract "fileNamePath "Extracts strings from the applications and forms in the definition file specified with the -d parameter. The strings are placed in the localization database (l10n.db ).
-export "ileNamePath "Exports the object definitions to an XLIFF file in the specified path on the server specified with the -x parameter.
-import " fileNamePath "Imports the objects defined in the definition file (specified with the -d parameter) into the localization database.
-processStarts the localization process using the definition file specified with the -d parameter.
-t "targetState "

Specifies the target state of the strings that were translated. The values are:

  • ready_to_translate
  • ready_for_review
  • approved
  • flagged
  • do_not_translate
-o "logFile "Specifies the path to a log file to which to redirect errors, which are normally displayed within the CLI.
-l "locale "Specifies the locale to be used for exporting object definition. This parameter is used with the -export parameter.
-root "pathToLocalizationDatabase "Species the file path to the root folder where the localization database (l10n.db ) resides.
-migrate

Migrates data from the local localization database to a database on the AR System server.

The following table lists the general parameters for each type of operation.

General parameters for the localization toolkit CLI

OperationRequired parametersOptional parameters
Extract-data,-x,-u,-p,-d,-extract-o, -w,-portnum
Export-data,-d, -l, -export

-o,-t

Important: If -t is not specified then ready_to_translate is considered.

Import-data,-x,-u,-p,-d,-import

-o, -w,-portnum,-t

Important: If -t is not specified then ready_for_review is considered.

Process-data,-x,-u,-p,-d,-process-o, -w,-portnum
Migrate-data, -root,-ldx,-ldu, -ldp,-migrate-o,-ldw,-ldportnum

The following table lists the parameters to include when the localization database is on the AR System server database. Use these parameters in addition to the general parameters listed in the following table.

Parameters for localization toolkit CLI when the localization toolkit is on the AR System server database

OperationRequired parameters when the localization toolkit is on the AR System server databaseOptional parameters
Extract-ldx,-ldu,-ldp-ldw,-ldportnum
Export-ldx,-ldu,-ldp-ldw,-ldportnum
Import-ldx,-ldu,-ldp-ldw,-ldportnum
Process-ldx,-ldu,-ldp-ldw,-ldportnum

To localize your application with the CLI

  1. Create a localization package definition. For more information, see Creating a localization package definition.
  2. To extract the strings to the localization database, run the following command from the directory where Developer Studio is installed:

    L10NToolkit -data <BMCRemedyDeveloperStudioInstallDir>\L10NToolkitCLI
    -x "<serverName>" [-portnum "<portNumber>"] -u "<userName>" -p "<password>"
    [-w "<authenticator>"] -d "<pathToDefinitionFile>" [-o "logFile"] -extract

    For example:

    L10NToolkit -data C:\Program Files\BMC Software\ARSystem\DevStudio\
    L10NToolkitCLI -x "computerA" -u "user1" -p "1Mx37s8M"
    -d "C:\Program Files\BMC Software\ARSystem\DevStudio\workspace\l10n\
    l10npackagedefinition.xml" -extract
  3. To export the strings to an XLIFF XML file:

    L10NToolkit -data <BMCRemedyDeveloperStudioInstallDir>\L10NToolkitCLI
    -d "<pathToDefinitionFile>" [-o "logFile"] [-t "targetState"]
    -export "<pathToExportedDefinitions>" -l "<locale>"
    

    For example:

    L10NToolkit -data C:\Program Files\BMC Software\ARSystem\DevStudio\
    L10NToolkitCLI -d "C:\Program Files\BMC Software\ARSystem\
    DevStudio\workspace\l10n\l10npackagedefinition.xml"
    -export "C:\Program Files\BMC Software\ARSystem\DevStudio\workspace\l10n\
    xliffdefinition.xml" -l "es"
    

    When you use the CLI to export strings, the export command always overwrites existing content.

  4. To import the XLIFF file that the translators have translated:

    L10NToolkit -data <BMCRemedyDeveloperStudioInstallDir>\L10NToolkitCLI
    -x "<serverName>" [-portnum "<portNumber>"] -u "<userName>" -p "<password>"
    [-w "<authenticator>"] -d "<pathToDefinitionFile>" [-o "logFile"] [-t "<targetState>"]
    -import "<pathToImportFile>"

    For example:

    L10NToolkit -data C:\Program Files\BMC Software\ARSystem\DevStudio\
    L10NToolkitCLI -x "computerA" -u "user1" -p "1Mx37s8M"
    -d "C:\Program Files\BMC Software\ARSystem\DevStudio\
    workspace\l10n\l10npackagedefinition.xml" -import "C:\Program Files\
    BMC Software\ARSystem\DevStudio\workspace\l10n\translation.xml" -t "ready_for_review"
  5. To create new localized views, messages, and data, or to update previously translated content:

    L10NToolkit -data <BMCRemedyDeveloperStudioInstallDir>\L10NToolkitCLI
    -x "<serverName>" [-portnum "<portNumber>"] -u "<userName>" -p "<password>"
    [-w "<authenticator>"] -d "<pathToDefinitionFile>" [-o "logFile"] -process

    For example:

    L10NToolkit -data C:\Program Files\BMC Software\ARSystem\DevStudio
    \L10NToolkitCLI -x "computerA" -u "user1" -p "1Mx37s8M"
    -d "C:\Program Files\BMC Software\ARSystem\DevStudio\workspace\l10n\
    l10npackagedefinition.xml" -process
  6. (Optional ) To migrate content from the localization toolkit client translation database to the AR System server database:

    L10NToolkit -data "<workSpaceLocation>" -root "<pathToSQLiteDatabase>" -ldx "<localizationDatabaseServer>" [-ldportnum "localizationDatabasePortNumber"]
    -ldu "<localizationDatabaseUser>" -ldp "<localizationDatabasePassword>"
    [-ldw "localizationDatabaseAuthenticator"] [-o "logFile"] -migrate

    For example:

    L10NToolkit -data c:\Development\workspace\runtime-New_configuration\
    L10nToolkitCLI -root "c:\Development\workspace\runtime-New_configuration\l10n22"
    -ldx "xxxxx-sjc-87" -ldu "Demo" -ldp "" -migrate
Was this page helpful? Yes No Submitting... Thank you

Comments