PDF editor pro UNIX / PDF editor for UNIX

Wiki : Translations

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

How to make translations

Download the template file pdfedit_xx.ts from attachment

Rename it by replacing xx by desired language code (for example de for German translation)

Now you will need to translate the strings in file. It can be done in two ways:

The file is a XML file, consisting of multiple context blocks, each consisting of one or more messages. In each message block, it is necessary to put the translated message into the <translation> element and remove the attribute type="unfinished":

The string can contain numbered parameters, marked %1, %2, %3, and so on, which are replaced in runtime. In the example below, %1 will be replaced by version of Qt library in runtime.

Example of translating part of file into german:

Chunk with message
        <source>Using Qt %1</source>
        <translation type="unfinished"></translation>

should become
        <source>Using Qt %1</source>
        <translation>Mit Qt %1</translation>

Another example of numbered parameters:
<source>Operator '%1' should have 1 parameter, but has %2 !</source>
%1 will be replaced by operator name
%2 will be replaced by number of parameters

Testing translation files

If you want to test the translation in pdfedit, you have to do the following:

  1. Type lrelease pdfedit_xx.ts to compile the pdfedit_xx.ts file to a binary file pdfedit_xx.qm
  2. Copy that file to the directory with other .qm files. It will probably be /usr/local/share/pdfedit/lang, but this may vary depending on configuration. (Also, as pdfedit can work even without installation, you can put the .qm file in src/gui/lang directory and run pdfedit directly from src/gui directory, right where it was left after compilation.)
  3. Set the correct locale (export LANG=xx) and launch pdfedit

  Attachment Size Date Added
      language_Persian.ts   305.94 KB   8.9.2015 00:00:00
      pdfedit_xx.ts   83.02 KB   6.3.2007 00:00:00
      language_English.ts   249.59 KB   8.9.2015 00:00:00
add new attachment:


There are no comments on this page. [Add comment]