Lang Builder Plugin

The Lang Builder plugin lets you sort and translate the language keys in your project.

Usage

To use the plugin, include it in your project’s root pom.xml file:

<build>
    <plugins>
    ...
        <plugin>
            <groupId>com.liferay</groupId>
            <artifactId>com.liferay.lang.builder</artifactId>
            <version>1.0.31</version>
            <configuration>
            </configuration>
        </plugin>
    ...
    </plugins>
</build>

You can view an example POM containing the Lang Builder configuration here.

Goals

The plugin adds one Maven goal to your project:

NameDescription
lang-builder:buildRuns Liferay Lang Builder to translate language property files.

Available Parameters

You can set the following parameters in the <configuration> section of the POM:

Parameter NameTypeDefault ValueDescription
excludedLanguageIdsString[]{"da", "de", "fi", "ja", "nl", "pt_PT", "sv"}The language IDs to exclude in the automatic translation.
langDirNameString"src/content"The directory where the language properties files are saved.
langFileNameString"Language"The file name prefix of the language properties files (e.g., Language_it.properties).
pluginbooleantrueWhether to check for duplicate language keys between the project and the portal.
portalLanguagePropertiesFileNameStringnullThe Language.properties file of the portal.
translatebooleantrueWhether to translate the language keys and generate a language properties file for each locale that’s supported by Liferay DXP.
translateSubscriptionKeyStringnullThe subscription key for Microsoft Translation integration. Subscription to the Translator Text Translation API on Microsoft Cognitive Services is required. Basic subscriptions, up to 2 million characters a month, are free.
« Javadoc Formatter PluginService Builder Plugin »
Was this article helpful?
0 out of 0 found this helpful