XPRNLS Command line tool
The command line tool xprnls is typically used with the following syntax from an operating system console:
xprnls command command_arguments
The command parameter is one of the following commands and command_arguments are the associated arguments (square brackets indicate optional arguments):
- info
- Display system configuration information relative to native language support: current system language, character encodings of system, console, file system, and actual encoding of the C type wchar (wide characters).
- conv [-s] [-f frenc] [-dos|-unix|-sys] [-t toenc] [-o dest] [-bom|-nobom] file
-
Convert the text file
file from the character encoding
frenc (default: UTF-8) to character encoding
toenc (default: UTF-8). The resulting file is saved into
dest (default: console). By default encoding errors are ignored (
e.g. an incomplete sequence is replaced by some default symbol) but using option '
-s' makes the conversion fail in case of error. The option '
-nobom' disables the insertion of a BOM
(Byte Order Mark) at the beginning of the file when it is required (a BOM is inserted when producing UTF-16 or UTF-32 documents) while option '
-bom' forces insertion of a BOM when creating an UTF-8 document (this is usually not required for this encoding).
The options ' -dos' and ' -unix' select the appropriate settings regarding BOM and line termination for the specified environment. The option ' -sys' selects the system encoding for the destination file and enables option ' -dos' or ' -unix' depending on the executing environment. - poconv [-s] [-dos|-unix|-sys] [-t toenc] [-o dest] [-bom|-nobom] pofile
- This command is a special version of the conv command described above specifically designed for PO (Portable Object) files (see Section Message translation with XPRNLS): it retrieves the source encoding from the file header and updates the output header according to the destination encoding.
- init [-o dest] potfile
- Create an initial PO file from the provided POT (Portable Objecy Template) file potfile. The resulting data is sent to the console or saved into dest.
- mogen [-d dir] [-o dest] pofile [[-o dest] pofile [...]]
- Compile a PO file pofile into an MO (Machine Object) file. If no destination name dest is provided the resulting file has the same name as the source file with the file extension ' .mo' instead of ' .po'. If a locale directory dir is specified then the resulting file is saved under ' dir/ lang /LC_MESSAGES' where lang is the language specified in the PO file (missing directories are automatically created). The destination file name is of the form ' domain .mo' assuming the source file name is of the form ' domain.lang .po'. Several PO files may be specified for a single operation.
- update [-f] [-m] pofile [pofile ...] potfile
- Update a group of PO files with the POT file potfile: messages of the POT file that are missing from the PO files are added and messages not included in the POT file are turned into comments. If the option ' -m' is used then the comment " #, missing" is put before missing translations (to ease their localisation). The PO file is not changed if it already contains all messages of the POT file unless option ' -f' is selected.
- merge [-o dest] [-c] pofile [pofile ...]
- Merge a collection of PO (or POT) files, the resulting data is saved into dest (default: console). If the option ' -c' is used then the first PO file is completed with the other files ( i.e. missing translations of the first file are searched for in the other files but no additional message is added).