froethen
froethen

Reputation: 2173

Java I18N properties file to XLIFF with Okapi

I was wondering how I can achieve the following with the Okapi Framework / Rainbow:

Convert Java I18N properties files to XLIFF for translation where some translations already exist and shall be part of the XLIFF file.

I have two Java properties files:

where main_en.properties is the reference file with all key/value pairs for I18N. main_de.properties contains already some translations but not all. Now I'd like to create an XLIFF file for translation from EN to DE with main_en.properties as the base (source) where existing translations are taken from main_de.properties (target).

How would such a pipeline in Rainbow with the necessary steps look like?

Upvotes: 1

Views: 857

Answers (1)

Mihai Nita
Mihai Nita

Reputation: 5787

From Rainbow:

  • in "Input List 1" tab --> right-click --> "Add documents" (or Ctrl+Insert) --> add the English file
  • in "Input List 2" tab --> right-click --> "Add documents" (or Ctrl+Insert) --> add the German file
  • in the "Languages and Encodings" tab change "Source Language" to "en" and "Target Language" to "de". Also set the encoding to iso-8859-1 for both (standard Java properties use iso-8859-1, utf-8 support was introduced with JDK 9
  • From the "Utilities" menu select "ID-Based Alignment..."
  • In the dialog configuring the operations specify a TMX output (in the "Output" tab)
  • Execute. The results will be in the TMX you specified

That's the basic stuff. You can also choose to segment the source and the target (the "Options" tab in the dialog), save the non-translated stuff to a separate TMX, etc.

Upvotes: 1

Related Questions