From 97c9a8d72271152cf71373b9c7fbdc6036b92e89 Mon Sep 17 00:00:00 2001
From: msweet
The PPD compiler provides localization of PPD files in different languages +through message catalog files in the GNU gettext or Apple .strings +formats. Each user text string and several key PPD attribute values such as +LanguageVersion and LanguageEncoding are looked up in the +corresponding message catalog and the translated text is substituted in the +generated PPD files. One message catalog file can be used by multiple driver +information files, and each file contains a single language translation.
+ +While CUPS includes localizations of all standard media sizes and options in +several languages, your driver information files may provide their own media +sizes and options that need to be localized. CUPS provides a utility program to +aid in the localization of drivers called ppdpo(1). The ppdpo program creates +or updates a message catalog file based upon one or more driver information +files. New messages are added with the word "TRANSLATE" added to the front of +the translation string to make locating new strings for translation easier. The +program accepts the message catalog filename and one or more driver information +files.
+ +For example, run the following command to create a new German message catalog +called de.po for all of the driver information files in the current +directory:
+ ++ppdpo -o de.po *.drv ++ +
If the file de.po already exists, ppdpo will update the +contents of the file with any new messages that need to be translated. To create +an Apple .strings file instead, specify the output filename with a .strings +extension, for example:
+ ++ppdpo -o de.strings *.drv ++ +
Once you have created a message catalog, use the #po directive to declare it in each +driver information file. For example, to declare the German message catalog for +a driver use:
+ ++#po de "de.po" // German ++ +
In fact, you can use the #po directive as many times as needed:
+ ++#po de "de.po" // German +#po es "es.po" // Spanish +#po fr "fr.po" // French +#po it "it.po" // Italian +#po ja "ja.po" // Japanese ++ +
The filename ("de.po", etc.) can be relative to the location of the driver +information file or an absolute path. Once defined, the PPD compiler will +automatically generate a globalized PPD for every language declared in your +driver information file. To generate a single-language PPD file, simply use the +-l option to list the corresponding locale, for example:
+ ++ppdc -l de -d ppd/de mydrivers.drv ++ +
to generate German PPD files.
-- cgit v1.2.3