Paint.NET Translation Pack Instructions Last updated: 2005-12-02 --------------------------------------- These are instructions on how to prepare a Language Pack for Paint.NET, and is intended for reading by translators. Overview -------- The following steps are required to do a translation of Paint.NET: 1. Translation of strings This comprises all the text that is displayed in the user interface for menu item names, etc. 2. Translation of file-based resources The credits in the About box is an RTF document that can be translated, and the bitmaps in the user interface may also be changed if necessary. For example, the German language pack changes the icons for the B, I, and U buttons that are used to toggle bold, italics, and underlining so that they correspond to the German words for these terms. 3. Translation of the Help file This is probably the largest part of creating a full language pack. The help file is a set of HTML pages that can be viewed with any web browser, such as Internet Explorer, Firefox, and Opera. 4. Packaging The language pack must be packaged correctly so that others may use it conveniently. Prerequisite Software --------------------- You will need the following software in order to correctly prepare a language pack: 1. Notepad, or your favorite plain-text editor You can use this to edit the Strings.resx file, which is simple XML. 2. Wordpad, or Word This is used to edit the credits for the About box. 3. Frontpage 2003, or possibly Dreamweaver If you have software that can work with DWT (Dynamic Web Template) files, this will make translating the Help files much easier. 4. Paint.NET Each language pack will require taking many screenshots of the user interface, for use in the Help file. 5. Paint.NET Source Code This is important for translating the Help file and user interface strings. There are many files that help Frontpage 2003 determine the structure of the documents, and these files are not included with a regular installation of Paint.NET. 5. Resgen.exe This is included in the source code ZIP file, in src/tools. It is used to compile the Strings.resx that you have translated in to the final .resources file that Paint.NET can understand. 6. WinZip, WinRAR, or your favorite ZIP-file manager You must correctly package the files that make up your language pack in to a ZIP file for convenient distribution. Translation of strings ---------------------- The first thing you must do is identify what culture code you will be translating to. There is a list of these codes at the end of this text file. For purposes of example, we will use French (fr) throughout these instructions. From the source code ZIP file, copy the file "src/Strings/Strings.resx" to someplace where you can work with it (the Desktop works nicely). Rename this to have the following form: Strings.[code].resx, where [code] is a culture code. For our example, we will rename Strings.resx to Strings.fr.resx Now, open this file with your favorite plain-text editor and translate all of the text between and pairs. NOTE: The .resx file starts with a lengthy header that is understood by the resgen.exe tool. DO NOT translate this! You must only translate all of the text that is within nodes. Also, it is recommended that you NOT use Visual Studio 2005 to edit this file, as it may change the header to reference .NET 2.0 components and then resgen.exe or Paint.NET will not be able to use it. For example: Move Layer Up The text after and before should be translated. The text in the name element ("LayerForm.MoveLayerUpButton.ToolTipText") must NOT be translated. Compiling Strings.[code].resx for use in Paint.NET -------------------------------------------------- At any point you may compile your .resx file and test it in Paint.NET. To do this, you must use the resgen.exe tool that is included in the translation pack ZIP file. Copy this tool to the same directory that your .resx is located, then open a command prompt (Start -> Run, type "cmd" and click OK). Use the 'cd' command to change to the directory that you have both of these files. Next, type the following: resgen /compile Strings.[code].resx,PaintDotNet.Strings.[code].resources For our French (fr) example, we would type the following: resgen /compile Strings.fr.resx,PaintDotNet.Strings.fr.resources Now we have a .resources file (such as PaintDotNet.Strings.fr.resources) that can be used in Paint.NET. Copy this file to where you have installed Paint.NET, and then run Paint.NET -- you should see a new entry available in the File -> Language menu! Select it, then click OK on the confirmation dialog, and then restart Paint.NET. You should see Paint.NET now using your translated strings! 2. Translation of file-based resources -------------------------------------- In the Paint.NET installation directory, there will be a directory named "Resources". In here is a directory called 'de' which contains some file-based resources that were translated to German. The Resources directory is laid out as such, and is located where Paint.NET was installed to: + Paint.NET |--+ Resources +--+ de | |-- Files.AboutCredits.rtf // Credits text for Help->About box | |-- Icons.FontBoldIcon.bmp // "B" for Bold toolbar icon | |-- Icons.FontItalicIcon.bmp // "I" for Italics toolbar icon | |-- Icons.FontUnderlineIcon.bmp // "U" for Underline toolbar icon | |--+ [ISO-639 culture code] |-- Files.AboutCredits.rtf |-- ... It is easy to make a copy of the 'de' directory, rename it to the culture code that you are translating for, and to then translate the files as appropriate. If the icon bitmaps do not need to be translated, then you may simply delete them. To get the English text for the About box credits, you may copy the file: src/Resources/Files/AboutCredits.rtf and rename it to Files.AboutCredits.rtf. For the credits, feel free to add yourself at the top, before the other names that are listed. For example: Pig Latin translation by Jon Smith Version 2.5 ----------- Rick Brewster Project Lead, Programming Tom Jackson Programming Dennis Dietrich Localization and German Translation ... 3. Translation of the Help file ------------------------------- The Help directory is laid out as such, and comes with the Paint.NET source code ZIP file: + src |--+ Help +-- index.html +-- stylesheet.cs +--+ en | +--+ Images | | |-- (various screenshots from user interface) | | | +-- pdn_help.dwt | |-- (various HTML documents) | |--+ images |-- (various language-neutral images -- do not translate) To begin translation, take the 'en' directory and make a copy of it. Then, rename new directory to the culture code you are translating for. This is where having Frontpage 2003 or Dreamweaver comes in handy. You can translate the pdn_help.dwt file first, and have its changes propogate to all of the other HTML files that are linked to it. This way you only have to manage the translation of the left-column navigation links one time. The images that were copied from Help/en/Images will have to be recreated for the culture code you are targetting. You should do this step after having translated the strings. It is recommended that each screenshot be taken with the Windows Classic theme, and with the Windows Standard color scheme. If you are using Windows 2000 then you will not have to set your theme (Windows 2000 doesn't support them), but do make sure to set the correct color scheme. NOTE: Do not translate the Copyright or License text other than the part of it that reads "All Rights Reserved." 4. Packaging ------------ For our French example, we want to have the following directory structure, which we will place in to a ZIP file in a moment: + fr +-- PaintDotNet.Strings.fr.resx +--+ Resources +--+ fr | |-- Files.AboutCredits.rtf // Credits text for Help->About box | |-- Icons.FontBoldIcon.bmp // "B" for Bold toolbar icon | |-- Icons.FontItalicIcon.bmp // "I" for Italics toolbar icon | |-- Icons.FontUnderlineIcon.bmp // "U" for Underline toolbar icon | + Help +--+ fr +--+ Images | |-- (various screenshots from the French user interface) | +-- pdn_help.dwt |-- (various HTML documents translated to French) If you are using WinRAR, you may select all of the files within the fr directory, right click, and select "Add to archive." Make sure to select ZIP as the archive type, and "Best" for the compression level. Then give the archive a suitable name, such as "PaintDotNet.fr.zip". To install your language pack, simply unzip its contents to the Paint.NET installation directory. The appropriate language should now be available in the File -> Language menu. At this point you should probably test your Language Pack on another computer, and/or have a friend try it out to make sure it works correctly! ISO-639 based Culture Codes --------------------------- There are neutral codes, and specific codes. In general, please use a neutral code unless you have a very specific reason for targetting a specific code. Neutral codes have no dash in them. For example, "ar" for Arabic, is a neutral code. "ar-DZ" for Arabic (Algeria) is a specific code. However, not all specific codes have an associated neutral code, and in this case you must use a specific code. zh-CHS, for Chinese (Simplified), is one such example. If you were to use just zh, Paint.NET would crash. af Afrikaans af-ZA Afrikaans (South Africa) sq Albanian sq-AL Albanian (Albania) ar Arabic ar-DZ Arabic (Algeria) ar-BH Arabic (Bahrain) ar-EG Arabic (Egypt) ar-IQ Arabic (Iraq) ar-JO Arabic (Jordan) ar-KW Arabic (Kuwait) ar-LB Arabic (Lebanon) ar-LY Arabic (Libya) ar-MA Arabic (Morocco) ar-OM Arabic (Oman) ar-QA Arabic (Qatar) ar-SA Arabic (Saudi Arabia) ar-SY Arabic (Syria) ar-TN Arabic (Tunisia) ar-AE Arabic (U.A.E.) ar-YE Arabic (Yemen) hy Armenian hy-AM Armenian (Armenia) az Azeri az-AZ-Cyrl Azeri (Cyrillic) (Azerbaijan) az-AZ-Latn Azeri (Latin) (Azerbaijan) eu Basque eu-ES Basque (Basque) be Belarusian be-BY Belarusian (Belarus) bg Bulgarian bg-BG Bulgarian (Bulgaria) ca Catalan ca-ES Catalan (Catalan) zh-HK Chinese (Hong Kong S.A.R.) zh-MO Chinese (Macau S.A.R.) zh-CN Chinese (People's Republic of China) zh-CHS Chinese (Simplified) zh-SG Chinese (Singapore) zh-TW Chinese (Taiwan) zh-CHT Chinese (Traditional) hr Croatian hr-HR Croatian (Croatia) cs Czech cs-CZ Czech (Czech Republic) da Danish da-DK Danish (Denmark) div Divehi div-MV Divehi (Maldives) nl Dutch nl-BE Dutch (Belgium) nl-NL Dutch (Netherlands) en English en-AU English (Australia) en-BZ English (Belize) en-CA English (Canada) en-CB English (Caribbean) en-IE English (Ireland) en-JM English (Jamaica) en-NZ English (New Zealand) en-PH English (Republic of the Philippines) en-ZA English (South Africa) en-TT English (Trinidad and Tobago) en-GB English (United Kingdom) en-US English (United States) en-ZW English (Zimbabwe) et Estonian et-EE Estonian (Estonia) fo Faroese fo-FO Faroese (Faroe Islands) fa Farsi fa-IR Farsi (Iran) fi Finnish fi-FI Finnish (Finland) fr French fr-BE French (Belgium) fr-CA French (Canada) fr-FR French (France) fr-LU French (Luxembourg) fr-MC French (Principality of Monaco) fr-CH French (Switzerland) mk FYRO Macedonian mk-MK FYRO Macedonian (Former Yugoslav Republic of Macedonia) gl Galician gl-ES Galician (Galician) ka Georgian ka-GE Georgian (Georgia) de German de-AT German (Austria) de-DE German (Germany) de-LI German (Liechtenstein) de-LU German (Luxembourg) de-CH German (Switzerland) el Greek el-GR Greek (Greece) gu Gujarati gu-IN Gujarati (India) he Hebrew he-IL Hebrew (Israel) hi Hindi hi-IN Hindi (India) hu Hungarian hu-HU Hungarian (Hungary) is Icelandic is-IS Icelandic (Iceland) id Indonesian id-ID Indonesian (Indonesia) it Italian it-IT Italian (Italy) it-CH Italian (Switzerland) ja Japanese ja-JP Japanese (Japan) kn Kannada kn-IN Kannada (India) kk Kazakh kk-KZ Kazakh (Kazakhstan) kok Konkani kok-IN Konkani (India) ko Korean ko-KR Korean (Korea) ky Kyrgyz ky-KZ Kyrgyz (Kyrgyzstan) lv Latvian lv-LV Latvian (Latvia) lt Lithuanian lt-LT Lithuanian (Lithuania) ms Malay ms-BN Malay (Brunei Darussalam) ms-MY Malay (Malaysia) mr Marathi mr-IN Marathi (India) mn Mongolian mn-MN Mongolian (Mongolia) no Norwegian nb-NO Norwegian (Bokmål) (Norway) nn-NO Norwegian (Nynorsk) (Norway) pl Polish pl-PL Polish (Poland) pt Portuguese pt-BR Portuguese (Brazil) pt-PT Portuguese (Portugal) pa Punjabi pa-IN Punjabi (India) ro Romanian ro-RO Romanian (Romania) ru Russian ru-RU Russian (Russia) sa Sanskrit sa-IN Sanskrit (India) sr-SP-Cyrl Serbian (Cyrillic) (Serbia and Montenegro) sr Serbian (Latin) sr-SP-Latn Serbian (Latin) (Serbia and Montenegro) sk Slovak sk-SK Slovak (Slovakia) sl Slovenian sl-SI Slovenian (Slovenia) es Spanish es-AR Spanish (Argentina) es-BO Spanish (Bolivia) es-CL Spanish (Chile) es-CO Spanish (Colombia) es-CR Spanish (Costa Rica) es-DO Spanish (Dominican Republic) es-EC Spanish (Ecuador) es-SV Spanish (El Salvador) es-GT Spanish (Guatemala) es-HN Spanish (Honduras) es-MX Spanish (Mexico) es-NI Spanish (Nicaragua) es-PA Spanish (Panama) es-PY Spanish (Paraguay) es-PE Spanish (Peru) es-PR Spanish (Puerto Rico) es-ES Spanish (Spain) es-UY Spanish (Uruguay) es-VE Spanish (Venezuela) sw Swahili sw-KE Swahili (Kenya) sv Swedish sv-FI Swedish (Finland) sv-SE Swedish (Sweden) syr Syriac syr-SY Syriac (Syria) ta Tamil ta-IN Tamil (India) tt Tatar tt-RU Tatar (Russia) te Telugu te-IN Telugu (India) th Thai th-TH Thai (Thailand) tr Turkish tr-TR Turkish (Turkey) uk Ukrainian uk-UA Ukrainian (Ukraine) ur Urdu ur-PK Urdu (Islamic Republic of Pakistan) uz Uzbek uz-UZ-Cyrl Uzbek (Cyrillic) (Uzbekistan) uz-UZ-Latn Uzbek (Latin) (Uzbekistan) vi Vietnamese vi-VN Vietnamese (Viet Nam)