1 # Translations instructions
3 If you are interested in translating WinMerge to your own language, we'd be happy to include your language as well.
5 We have a list with the [status of current translations](https://winmerge.org/translations/), so you can check if your language is already available and/or it needs to be updated.
7 ## Translating WinMerge
9 We use [gettext](https://en.wikipedia.org/wiki/Gettext) PO files for the translation of the WinMerge program.
11 PO files are plain text, so you can even translate using a normal text editor. But we recommend that you use [poEdit](http://www.poedit.net/) or other tools that can handle and manipulate PO files.
13 **NOTE:** We are not using gettext itself as a translation system, we only use PO- and POT-files as files to have translations. Our translation system is custom-made for WinMerge.
15 The PO template `English.pot` and the language translation files are located under the `Translations\WinMerge\` folder in the source code.
17 ### Add new language to WinMerge
19 1. Copy and rename `English.pot` to `YourLanguage.po`, where *YourLanguage* is the english name of your language.
21 2. Now translate what you can using [poEdit](http://www.poedit.net/). If you are not sure with one or the other translation, mark it as fuzzy. You can enter a comment in poEdit to give some information about your thoughts to other translators.
23 3. Compile WinMerge to test your changes.
25 ### Update existing language
27 1. Get the `English.pot` template and the `YourLanguage.po` file you want to improve.
28 2. Start [poEdit](http://www.poedit.net/) with `YourLanguage.po` and select *Update from .pot file* from the *Catalog* menu.
29 3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
30 4. The *untranslated* strings (and *fuzzy* translations) are always at the top of the list.
31 5. Compile WinMerge to test your changes.
33 ## Translating ShellExtension
35 ShellExtension (Explorer integration component) can be translated by translating PO file in the `Translations\ShellExtension\`-folder in the WinMerge source tree.
37 After updating one or more PO files the updated `RC` files are generated by the script `CreateTranslatedRcFiles.vbs`.
39 ### Add new ShellExtension translation
41 1. Copy and rename `English.pot` to `YourLanguage.po`, where *YourLanguage* is the english name of your language.
43 2. Now translate what you can using [poEdit](http://www.poedit.net/). If you are not sure with one or the other translation, mark it as fuzzy. You can enter a comment in poEdit to give some information about your thoughts to other translators.
45 3. Add a resource definition to file `ShellExtension\ShellExtension.rc`:
48 "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_XXX)\r\n"
50 "LANGUAGE LANG_XXX, SUBLANG_DEFAULT\r\n"
51 "#pragma code_page(65001)\r\n"
52 "#include ""Languages\\ShellExtensionYourLanguage.rc""\r\n"
58 ### Update existing ShellExtension translation
60 1. Get the `English.pot` template and the `YourLanguage.po` file you want to improve.
61 2. Start [poEdit](http://www.poedit.net/) with `YourLanguage.po` and select *Update from .pot file* from the *Catalog* menu.
62 3. Select `English.pot` and wait until poEdit has finished merging the template and the current translation.
63 4. The *untranslated* strings (and *fuzzy* translations) are always at the top of the list.
65 ## Translating Installer
67 Installer translation files are in `Translations\InnoSetup\` folder. Look for a file named by your language.
69 If one does not yet exist, copy and rename `English.isl` to `YourLanguage.isl`, where *YourLanguage* is the english name of your language.
71 Translate the text after the `=` character:
74 OptionalFeatures=Optional Features:
75 CompanyName=Thingamahoochie Software
79 ## Translating ReadMe.txt
81 Please consider translating also `ReadMe.txt` file - it is shown in end of installer and is added to Start-menu. Translated versions of `ReadMe.txt` are in `Translations\Docs\Readme\` folder. And master `ReadMe.txt` is in `Docs\Users\ReadMe.txt`.
83 ## Translating Website
85 We use PO files for the website too. But the source files are in its own [GitHub project](https://github.com/winmerge/website/).