Localizing string resources by exporting and importing files
You can use the gwb exportLocalizations and gwb importLocalizations commands to work with a single file of translatable strings.
The export command has the following syntax:
gwb exportLocalizations -Dexport.file=targetFile -Dexport.language=languageCode
The exported file has all the string resources, such as display keys, in it, which cannot be guaranteed for any given property file. The string resources are separated into translated and untranslated strings, which makes it easier to see which ones you need to translate. The translated stings are extracted from the existing property files.
gwb exportLocalizations -Dexport.file=my-test-en_US.txt -Dexport.language=en_USThis command exports results to the file my-test-en_US.txt in the main PolicyCenter directory.
The following code example shows some of the string resources in the untranslated and translated sections of an exported file:
#untranslated keys
Workflow.MetroReportWorkflow1.CheckHasReportDocumentReady.Step=CheckHasReportDocumentReady
Workflow.MetroReportWorkflow1.CheckOnInquiry.Step=CheckOnInquiry
Workflow.MetroReportWorkflow1.CheckOnOrder.Step=CheckOnOrder
Workflow.MetroReportWorkflow1.DownloadClosedReport.Step=DownloadClosedReport
Workflow.MetroReportWorkflow1.DownloadReport.Step=DownloadReport
...
#already translated
Admin.Workload.WorkloadClassification.General=General
AdminData.ActivityPattern.Description.Account_Denial=Review denial decision with Account Manager
AdminData.ActivityPattern.Description.Account_Fatality=Consult Account regarding fatality
AdminData.ActivityPattern.Description.Account_Instructions=Review all Special Handling instructions
AdminData.ActivityPattern.Description.Account_Matter=Review matter-related Special Handling instructions
AdminData.ActivityPattern.Description.Account_Negotiation=Review negotiation strategy with Account
...
Because the export was done for en_US, all the display keys, typekey names, and
so on are in U.S. English.
After you make your translations, import the translated file.
The import command has the following syntax:
gwb importLocalizations -Dimport.file=sourceFile -Dimport.language=languageCode
All strings in the file that you import, whether translated or not, are saved in property files with that extension. PolicyCenter extracts the stings for the appropriate file and updates that file. For example, typekey strings are extracted and stored in typelist_languageCode.properties file for that locale code.
See also
