                    WinRAR localization

I. Introduction

   We appreciate volunteer translators help in localizing WinRAR
to their languages. But before starting the job and to avoid redundant work,
please contact your local distributor or directly roshal@rarlab.com
to check if anybody is already working on it.

   If you prepare the translation, we will be glad to give you a free
WinRAR registration. You can also put "Translated by <your name>" to
WinRAR "About" dialog and help file. 

   If you are WinRAR translator and wish to get notifications about
new WinRAR beta versions and releases, please write to roshal@rarlab.com
about it and I'll add you to my mailing list.

   There are a few possible levels of translation. The best is complete,
when you translate all documentation, executable files, the installer
and build the localized distributive. But incomplete is also acceptable.
In last case you translate executables and only a part of documentation
or none of documentation at all and put the translated files to SFX archive.

   You do not need to have any special skills to localize executable files,
just edit plain text messages. Translating of winrar.chm is a bit more
complicated, you'll need to use HTML Help Workshop, which was available here:
http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en
If this link doesn't work, contact me and I'll help to resolve it.


   Details of the localization process are described below.


II. Localization of executable files

   There are two different methods to localize WinRAR executables.
The first is simple and recommended, it does not require special
skills and programs. You just edit plain text files containing
program messages. The second method is much more complicated,
you need to have a resource editor and compiler and be familiar
with Windows resources. If you wish to use the second method,
you need to look at Resources\readme.txt file, the first is described
below.

  If you use the first method, please ignore all files from Resource
folder. You need to translate all *.lng files in the folder "Lng"
of this distributive. Translate only those strings, which are
started with symbolic identifier like IDS_OK. Indentifiers are followed
by spaces and then string text enclosed in quotes.

Identifiers must not be changed, edit only text enclosed to quotes. 
Strings started from ';' are comments and you do not need to
translate them.

Lng files use keywords :STRINGS, :MENU name, :DIALOG name to denote start
of strings block, menu or dialog data, :DIRECTION to define text the text
direction. SIZE and CAPTION are used to define dialog dimensions and title.
While you can change parameters after keywords, do not modify keywords
themselves.

You may use any text editor to perform the translation.
Files can be saved either as ASCII or as little endian Unicode text.
Little endian Unicode is preferable, because it makes WinRAR localization
independent from Windows language settings.

   Do not modify or remove special character combinations like
"%s", "%d", "%u", "\n". Character '&' precedes hot keys in dialogs
and you may move it to another place of a string to assign
a proper hot key.

   SIZE line in each dialog messages is "100*100" and denotes the dialog
width and height in percents. If you need to increase a dialog size,
you may change it, for example, to "120*100". But when possible,
better avoid it and use shorter word equivalents instead of increasing
dialogs.

   CAPTION line defines the dialog title text.

   If you translate to language having right to left reading order,
add the following line to all .lng files:

:DIRECTION RTL

It can be added anywhere, though we suggest to place it after ***messages***
signature. It will force executables to use right to left mode.

   Please do not change "http://www.rarlab.com" string unless
you are an authorized RAR site.

   When the translation is done, you need to merge sfx.lng, rar.lng,
and setup.lng files to SFX modules. It is necessary only for these
three .lng files, for the rest of .lng it is enough to put them to
the same folder as corresponding executables. Merging can be done
using addlng.exe program from Tools folder.

For 32 bit WinRAR you need to merge translated sfx.lng to
Lng\Default32.SFX and Lng\Zip32.SFX modules, translated rar.lng to
Lng\WinCon32.SFX module and translated setup.lng to Lng\Setup32.SFX module.

For 64 bit WinRAR you need to merge translated sfx.lng to
Lng\Default32.SFX, Lng\Default.SFX, Lng\Zip32.SFX, Lng\Zip.SFX modules,
translated rar.lng to Lng\WinCon32.SFX, Lng\WinCon.SFX modules
and translated setup.lng to Lng\Setup.SFX module.

If you wish, you may use "copy/b" command instead of addlng.exe program.

  When this stage is completed, you should have translated
rar.lng, rarext.lng, uninstall.lng, winrar.lng files.

Also for 32 bit WinRAR you should have modules Default32.SFX, Zip32.SFX,
WinCon32.SFX, Setup32.SFX, where translated sfx.lng is merged to the first two
modules, rar.lng is merged to WinCon.SFX and setup.lng is merged to
Setup.SFX.

For 64 bit WinRAR you should have modules Default32.SFX, Default.SFX,
Zip32.SFX, Zip.SFX, WinCon32.SFX, WinCon.SFX, Setup.SFX, where translated
sfx.lng is merged to the first four modules, rar.lng is merged
to WinCon32.SFX, WinCon.SFX and setup.lng merged to Setup.SFX.

  Note that if you wish to rename translated or English SFX modules,
a new name of Default32.SFX, Default.SFX still must include "Def" substring
and Zip32.SFX, Zip.SFX name - "Zip" substrings. 32 bit modules must include
"32" just before the ".SFX" extension. For example, Def_ABC32.SFX
and Zip_ABC.SFX are correct names, when Rar_ABC.SFX is incorrect.


III. Translating and compiling the online help (winrar.chm)

   To translate WinRAR help you need to download and install
HTML Help Workshop, which is available here:

   http://www.microsoft.com/downloads/details.aspx?familyid=00535334-c8a6-452f-9aa0-d597d16580cc&displaylang=en

   You can also download the documentation for HTML Help Workshop
on the same page.

   You need to translate HTML files from "Help\html" folder.
They are plain text files and can be edited in any text editor
like Notepad. Do not change HTML tags enclosed in angle brackets
unless you understand what you do and need it for your design conception.
Do not forget that these are HTML files, which should be edited according
to HTML rules. For example, you cannot place " < > characters directly to
them and must replace them with &quot; &lt; &gt; correspondingly.

   All WinRAR English HTML files contain "charset=Windows-1252" string
in META tag definition. You may need to replace 1252 with code page
number for your language. List of code page numbers is available here:
http://msdn.microsoft.com/en-us/library/dd317756%28VS.85%29.aspx

   Also you need to translate winrar.hhc and winrar.hhk files
in "Help" folder. Winrar.hhc contains the help contents and winrar.hhk
contains help keywords. You can use either HHW shell of HTML Help Workshop
for this task or translate strings denotes as "###" in the following
constructions:

  <param name="Name" value="###">
  <param name="Keyword" value="###">

   After translating HTML files you can build winrar.chm file.
You can do it with help compiler HCC.EXE from the command line:

  HCC.EXE /c winrar.hhp

or you may open winrar.hhp from HHW shell and run File/Compile.
Both HHC.EXE and HHW shell are parts of HTML Help Workshop.

  Besides, I noticed a strange problem in HHW: it worked well with
winrar.hhp if it was opened using "File/Open..." menu, but it failed
to save modified winrar.hhp if it was opened by double clicking on
its icon in Windows. So it might be safer to use "File/Open..." menu.

   After completing this stage, you should have the translated
winrar.chm file.

   If you need to insert or delete a new topic you can edit
winrar.hhc and winrar.hhk files manually as usual plain text files,
but since their structure is rather complex, it may be easier to use
HHW shell for this purpose. Firstly, add a new html file to "Project"
page. Secondly, add it to "Contents" page. Thirdly, you may add
keywords for new topic on "Index" page.


IV. Translating text documents

   Translate descript.ion and all .txt files from WinRAR
distributive. These are plain text files, so you may use any text
editor to do it.


V. Building the distributive

   If you translated all necessary files and wish to make a completely
localized distributive, you need to unpack the complete contents
of the original English WinRAR distributive to some folder. Unpack
32 bit WinRAR distributive when you build 32 bit version 
and 64 bit WinRAR distributive when you build 64 bit version.
After unpacking add the following translated files to this folder:

for 32 bit WinRAR:

rar.lng
rarext.lng
uninstall.lng
winrar.lng
Default32.SFX
Zip32.SFX
WinCon32.SFX
winrar.chm

for 64 bit WinRAR:

rar.lng
rarext.lng
uninstall.lng
winrar.lng
Default32.SFX
Default.SFX
Zip32.SFX
Zip.SFX
WinCon32.SFX
WinCon.SFX
winrar.chm

Do not copy sfx.lng, setup.lng or Setup.SFX here.

  Then you need to translate Lng\Setup.s file. This file is
the same for 32 bit and 64 bit WinRAR. This is a plain text file,
so you may use any text editor. It must be saved as Windows or Unicode text.
Please translate only parameters of Text and Title command and nothing more.
Its Text command contains HTML text. If you do not know HTML, there is
a simple rule: just ignore all text between '<' and '>' characters and
translate the rest. For example, in the text:

  Text
  {
  <b><i><font face="Terminal">WinRAR</font></i> is a powerful archiver</b>.
  It provides complete support of <b><font color="#0000a0" face="Arial">RAR</font></b> and
  }

you need to translate:

  "WinRAR", "is a powerful archiver", "It provides complete support of",
  "RAR", "and"

and keep the rest of text untouched.

   If you translate to language having right to left reading order,
add dir="rtl" to <body> tag of setup.s: <body dir="rtl" bgcolor="#efefef">

When you finished, put Setup.SFX (Setup32.SFX for 32 bit version)
and setup.s to some other folder, not the same as other files.

For example, let's suppose that the folder with all prepared files
is "C:\RAR" and the folder with Setup.SFX and setup.s is "C:\Setup",
your WinRAR is installed to "c:\program files\winrar" and you wish
to name the new distributive as winrar-x32-380ln.exe.

In such case you need to open the command prompt and run:

  "c:\program files\winrar\rar" a -r -ep1 -cfg- -s -m5 -zc:\setup\setup.s -sfxc:\setup\Setup32.SFX c:\setup\winrar-x32-700ln c:\rar\*.*

This command should create the distributive in "c:\setup" folder.

For 64 bit version this command will look like:

  "c:\program files\winrar\rar" a -r -ep1 -cfg- -s -m5 -zc:\setup\setup.s -sfxc:\setup\Setup.SFX c:\setup\winrar-x64-700ln c:\rar\*.*

If you have other file or folder names, please edit the command line
correspondingly.

If your setup.s is in Unicode, you also need to add -scuc switch to
the command line.

Use following names for WinRAR distributives:

  - for 32 bit releases: winrar-x32-NNNll.exe, where "NNN" is a version number, 
    3 digits, and "ll" is a language, 1 - 6 characters. For example,
    winrar-x32-390ru.exe;

  - for 64 bit releases: winrar-x64-NNNll.exe, where "NNN" is a version
    number, 3 digits, and "ll" is a language, 1 - 6 characters.
    For example, winrar-x64-390fr.exe;

  - for 32 bit beta versions: winrar-x32-NNNbMll.exe, where "NNN" is a version
    number, 2 or 3 digits, "M" is beta number, 1 digit, and "ll" is
    a language, 1 - 6 characters. For example, winrar-x32-39b2nl.exe;

  - for 64 bit beta versions: winrar-x64-NNNbMll.exe, where "NNN" is
    a version number, 2 or 3 digits, "M" is beta number, 1 digit, and "ll"
    is a language, 1 - 6 characters. For example, winrar-x64-39b2cz.exe.

Do not lock SFX archive unless we already agreed that you lock and sign it
with your signature. Send the distributive to roshal@rarlab.com
to sign and add to our site.

Feel free to insert your name to "Translated by\nyour name" string
in winrar.lng instead of "your name" text and you may also add your
name as a translator to winrar.chm.

Unless you are RAR site, please do not change strings "site name",
"site name 2", "site URL" and "site URL 2" in winrar.lng. But if you are
official RAR site, you may add your RAR page to "site name" and "site URL".
Also please do not change IDS_REMINDERURL string without WinRAR GmbH
permission.

                                            Thank you for work!

