AC3Filter:How to translate
Translation is easy! This manual describes how to make a new translation of AC3Filter or fix bugs in an existing one using poEdit program.
 Installing poEdit
First, you need to install the latest official AC3Filter package. This guarantees that you have the latest translation template file (a file with a list of all original untranslated strings).
Next, download Windows version of poEdit, install and run it. On the first run it will ask you for your name and e-mail. This information will be saved in the translation files you create, so people can contact you about bugs in your translation.
Note, that this program is fully translated into many languages (it would be strange if it were not :) so you can work comfortably. But in this manual I will use English interface, so you may need to switch your language to English to be able to navigate through the menu.
 Creating a new translation
In poEdit pulldown menu choose File->New translation from POT file. POT file is a translation template file, with a list of original untranslated strings. This file is installed with the filter into AC3Filter_dir\lang folder (where AC3Filter_dir is a folder where AC3Filter is installed; default folder is C:\Program Files\AC3Filter). Choose ac3filter.pot file.
Next dialog gives details of your new translation. Complete it like this:
In Project name and version field indicate the filter version you're making translation for. Leave charset as utf8 as the most portable format.
After you're done with the form, the program will ask you where you want to save the result. Write PO file (the resulting file with translated messages) back to the AC3Filter_dir\lang. The name of the file must be a 2 or 3-letter code of you language. See the list of language codes.
After it you'll see something like this:
It is a list of all strings at the top of the window. In the example above IDC_CHK_JITTER is selected. Below you can see the fields for untranslated string, developer's comment (not editable) and your translation.
There're two types of strings:
- Simple strings. These strings are used in the code directly. Simply translate the string.
- Control labels. Each translatable control on the dialog has a unique name starting with prefix IDC. It is a control //name//, not actual control text. To help you to find the control, original control label can be found at developer's comment. In the example above, original control label for control 'IDC_CHK_JITTER' is 'Jitter correction'. Also, control names have some info in it. Control started with IDC_GRP is a group box, IDC_CHK is a check box, IDC_LBL is a label, IDC_BTN is a button and IDC_RB is a radio button. Each group box control is followed by all the controls it contains. In the example above 'IDC_CHK_JITTER' control follows 'IDC_GRP_SYNC' ('Audio/Video syncronization') group box. Now we can find it in the dialog window: this control is a check box named 'Jitter correction' in the group named 'Audio/Video synchronization':
You need to translate the original control label that can be found at the developer's comment.
When you finish the translation you'll see something like:
 Translation guides
If you're not sure how to translate something, leave it untranslated. Do not make fuzzy translation!
Input\tmean: %ims\tstddev: %ims\n Output\tmean: %ims\tstddev: %ims
This text is about jitter parameters. First string is about input jitter and second is about output. 'mean' is arithmetic mean (average value). 'stddev' is common name for standard deviation. 'ms' is milliseconds.
 Testing the translation
You may need to test your translation from time to time (for example to make ensure that there's enough space for your translated string). To do this, save your translation. This will create 2 files: lng.po (text file with the translated strings) and lng.mo (machine-oriented file). You need to place the last to the proper location.
Create folder AC3Filter_dir\lang\lng\LC_MESSAGES where AC3Filter_dir is a folder where AC3Filter is installed and lng is 3-character language code. (For Russian translation and default filter location you can see the following folder: c:\Program Files\AC3Filter\lang\rus\LC_MESSAGES) Copy your lng.mo file there and rename it to ac3filter.mo.
That's all. Now you can open filter configuration and choose your language!
 Editing an existing translation
You can edit an existing translation in the same way. All PO files for languages supported are distributed with the filter. Just open a PO file you want to modify.
It is a good idea to contact the file creator or the last translator before modifying the file. You can find contact details in the translation info when you choose a language in AC3Filter:
 Including the translation into AC3Filter distribution.
Just contact the author and send the PO file you have created/updated.
 More info about translation
AC3Filter uses GNU gettext library for internationalization. You can find more info about how it works, about manipulating PO/MO files and much more in this manual.