Language:
Page Info
Tags:
Engine Version:

Localization Commandlets

Choose your OS:

GatherText

This is the master commandlet that must be run in order to configure and run other localization commandlets. It takes only one argument, Config, which specifies the path to the INI format file that lists the commandlets to run and their own configuration . The commandlet reads the specified file and looks for sections named GatherTextStep with a 0-based index numeral suffix. Each step must specify a value for the key CommandletClass which specifies the name of the commandlet to execute. Additional configuration for commandlets can be provided in a CommonSettings section.

All paths should be provided relative to the project's root directory unless otherwise specified.

All other commandlets take a command-line parameter of Config and Section so that they may read from the specified INI file's specified section and the CommonSettings section.

For Gathering

GatherTextFromSource

This commandlet scans specified directories that pass specified filters, parses matching files for markup like LOCTEXT_NAMESPACE, LOCTEXT, NSLOCTEXT and other macros with special relevance to localization, and gathers that text for processing.

Setting

Description

ManifestDependencies

Text found in the specified manifests will not be gathered.

IncludePaths

These paths will be scanned.

ExcludePaths

Paths that match these patterns will be excluded from scanning.

SourceFileSearchFilters

Files matching these filters will be parsed.

GatherTextFromAssets

This commandlet scans specified directories that pass specified filters, loading the packages found and iterating through them, gathering text for processing.

Setting

Description

ManifestDependencies

Text found in the specified manifests will not be gathered.

ModulesToPreload

The names of modules to be loaded before iterating through packages that have been loaded. To be used if discovered packages depend on an unloaded module.

IncludePaths

These paths will be scanned.

ExcludePaths

Paths that match these patterns will be excluded from scanning.

PackageExtensions

Packages with these extensions will be iterated through.

ExcludeClasses

Objects of these classes within packages will not be checked for gathering.

bFixBroken

Repairs cases where a text within an asset is missing a key or conflicts with another text.

GatherTextFromMetadata

This commandlet scans specified directories that pass specified filters, iterating through the metadata of objects whose class comes from those directories, creating text from metadata values for specified metadata keys. Settings must be used to specify which metadata should be read and what the created text's namespace and key should be. The key may use formatting arguments including:

Argument

Description

FieldPath

The qualified path to the object this metadata is from.

MetaDataValue

The string value of the metadata key.

Setting

Description

ManifestDependencies

Text found in the specified manifests will not be gathered.

ModulesToPreload

The names of modules to be loaded before iterating through packages that have been loaded. To be used if discovered packages depend on an unloaded module.

IncludePaths

These paths will be scanned.

ExcludePaths

Paths that match these patterns will be excluded from scanning.

InputKeys

Metadata keys to be used for creating text.

OutputNamespaces

Namespaces to be used for the created text.

OutputKeys

Pattern string to be formatted and used for the created texts' keys.

For Generation

GenerateGatherManifest

This commandlet writes a manifest file with the specified name to the specified directory using the data that has been gathered thus far by other gather commandlets.

Setting

Description

ManifestDependencies

Text found in the specified manifests will not be written to the new manifest.

DestinationPath

The path to the directory to write the manifest file to.

ManifestName

The full name of the manifest file to be written to, typically named the same as the target and with the "manifest" extension.

GenerateGatherArchive

This commandlet writes archive files with the specified name to the specified culture-named subdirectories of the specified directory using the specified manifest file. Existing archives will be updated if they exist.

Setting

Description

DestinationPath

The path to the directory containing the manifest and where culture-specific subdirectories reside for the archives being written.

ManifestName

The full name of manifest the file to be read from, typically named the same as the target and with the "manifest" extension.

ArchiveName

The full name of the archives files to be written to, typically named the same as the target and with the "archive" extension.

SourceCulture

The name of the culture to which the native source text belongs. The archive for this culture will simply contain the source strings as its translation strings.

CulturesToGenerate

The names of cultures for which stubbed archives should be generated.

bPurgeOldEmptyEntries

If true, entries in an existing archive file that lack a translation will be removed before the archive is updated with new entries from the manifest. The result is that entries no longer present in the manifest and not already translated are purged.

GenerateTextLocalizationResource

This commandlet writes localization resources files with the specified name to the specified culture-named subdirectories of the specified directory using the specified manifest file and all discovered archive files.

Setting

Description

SourcePath

The path to the directory containing the manifest and where culture-specific subdirectories reside for the archives being written.

ManifestName

The full name of the manifest file to be read from, typically named the same as the target and with the "manifest" extension.

CulturesToGenerate

The names of cultures for which localization resources should be generated.

DestinationPath

The path to the directory where culture-specific subdirectories reside for the localization resources being written.

ResourceName

The full name of the localization resource file to be written to, typically named the same as the target and with the "locres" extension.

For Maintenance

RepairLocalizationData

This commandlet repairs and updates localization data between different versions. It repairs manifests and archives exclusively. Localization resources can be regenerated from repaired/updated manifests and archives as usual.

Setting

Description

DestinationPath

The path to the directory containing the manifest and where culture-specific subdirectories reside for the archives being read and written.

ManifestName

The full name of the manifest file to be read from and written to, typically named the same as the target and with the "manifest" extension.

ArchiveName

The full name of the archive file to be read from and written to, typically named the same as the target and with the "archive" extension.

CulturesToGenerate

The names of cultures for which archives should be repaired and updated.

GenerateTextLocalizationReport

This commandlet generates and updates reports such as word counts and text conflicts.

Setting

Description

DestinationPath

The path to the directory where reports will be written to.

bWordCountReport

If true, a word count report will be generated.

SourcePath

The path to the directory containing the manifest and where culture-specific subdirectories reside for the archives being read.

ManifestName

The full name of the manifest file to be read from, typically named the same as the target and with the "manifest" extension.

CulturesToGenerate

The names of cultures for which archives should be read from.

WordCountReportName

The full name of the CSV (comma-separated values) file to be read from and written to containing a table of word counts for cultures over time.

bConflictReport

If true, a conflict report will be generated.

ConflictReportName

The full name of the text file to be written to containing a list of all conflicting namespace/key/text entries.