KWEBAPP-XLIFF(1) General Commands Manual KWEBAPP-XLIFF(1)


kwebapp-xliffextract and merge translatable strings from kwebapp configurations


kwebapp-xliff [-c] -j config [xliff...]

kwebapp-xliff [-c] -u config xliff

kwebapp-xliff [-c] [config]


The kwebapp-xliff utility extracts, merges, and updates translatable strings from and into kwebapp(5) configurations. These strings are used only by kwebapp-javascript(1). By default, kwebapp-xliff extracts all translatable labels. The arguments are as follows:
Instead of creating an empty target when extracting strings, joining translation, or updating with new translations, fill in the target with the source.
-j config
Merges one or more xliff files with an untranslated kwebapp(5) configuration file config, producing another configuration on standard output containing the translated strings.
-u config
Update the xliff file with new translation labels found in config. The updated translations are emitted on standard output.
An XLIFF 1.2 file containing translated strings.
A kwebapp(5) configuration file.
Translatable content in kwebapp(5) is limited to jslabel phrases for enumerations and bitfields.
The usual usage sequence is as follows:
  1. Extract translatable content from a kwebapp(5) configuration into an XLIFF file.
  2. Give the XLIFF file a target language and translate the strings.
  3. Merge the XLIFF file back into the original kwebapp(5) with -j. Already-translated labels for the given language are not overriden by default.
  4. Use the produced configuration for further use in kwebapp-javascript(1).
With these steps, integral enumeration values produced by the JSON output of kwebapp-c-source(1) and kwebapp-c-header(1) may be translated into human-readable, language-specific labels.


The kwebapp-xliff utility exits 0 on success, and >0 if an error occurs.


Take a dummy configuration containing the following:
enum foo { 
  item bar 0 jslabel "bar"; 
  item foo 1 jslabel "foo"; 
When run through kwebapp-xliff, this configuration produces the following translatable strings:
<xliff version="1.2"> 
  <file target-language="TODO" tool="kwebapp-xliff"> 
      <trans-unit id="1"> 
      <trans-unit id="2"> 
Change the language into something useful, such as “fr”, and translate the strings into “le bar” and “le foo”, respectively. Run through kwebapp-xliff -j, this produces:
enum foo { 
  item bar 0 
    jslabel "bar" "le bar"; 
  item foo 1 
    jslabel "foo" "le foo"; 
This output file can then be used with kwebapp-javascript(1) to have per-language label filling.


kwebapp-javascript(1), kwebapp(5)
August 2, 2018 OpenBSD 6.3