Articles

learn more about encryption

Translating to Other Languages

Although this article is about Kryptel localization, it is fully applicable to Silver Key.

Every text string that Kryptel displays, be it an error message, a menu item, a button label, and so on, is obtained from one of Kryptel language files. All the language files can be found in the Localization subdirectory of the Kryptel's program directory:

"C:\Program Files\Kryptel\Localization" for all Kryptel editions on all 32-bit Windows or Kryptel Enterprise 64-bit on Windows x64.

"C:\Program Files (x86)\Kryptel\Localization" for all 32-bit Kryptel editions on Windows x64.

You can recognize a language file by its extension, which is a hexadecimal number, representing the language code. For example, Browser.409 contains Kryptel Browser-related English US messages; Common.407 contains commonly used messages in German, and so on. You can find a complete list of language codes in the appendix.

The English US (*.409) files are so-called base files, and they can't be edited with the supplied tool (although they can be edited manually using Notepad or another text editor).

How does it work

Every Kryptel message has an associated identifier, which looks like "PASSWORD_DIALOG_TITLE" or "ERR_INVALID_FILE_NAME". For example, when Kryptel needs to display the error message "Empty or invalid file name", it first searches the appropriate language file for the message with the identifier "ERR_INVALID_FILE_NAME". If the current language is German, it scans the corresponding .407 file. If the message was not found there (or if there is no such file), Kryptel tries to locate it in the English/US .409 file, which must be present and must contain the message (that's the reason why it is called base file).

Message translation is not required to be complete; partial translation is all right - Kryptel will get the missing messages from the .409 files. As soon as at least one message is translated, the corresponding language will be selectable in the Crypto Settings panel.

Creating A New Translation

Create a new empty folder and copy there the contents of the Kryptel Localization folder. Open the new folder, locate the program MsgEditor.exe, and double-click it to open the Message Editor window.

Message Editor screen

Note that copying the contents the Localization folder to another folder is not really necessary. Just make sure that Message Editor can write there because Vista/Win7 write-protects the Program Files folder and its subfolders. If your system is Vista or Windows 7, start Message Editor by right-clicking MsgEditor.exe and selecting "Run as Administrator". A good practice is to press the Save button immediately after you edit the first message in order to ensure that the files can be saved and your work will not be lost.

Now select the target language, the message file, and the message you want to translate. Enter the message in the target language in the lowest pane. Press Save. Congratulations, you have just created a new translation and can now select the new language in the Crypto Settings panel (you need to copy the files back to the Localization folder first).

Translating messages in Message Editor

Do this for all the messages in all the message files, and the job is done!

IMPORTANT: All the formatting arguments must remain unchanged, and must go in the same order as in the base file. Formatting argument looks as a per cent sign followed by a sequence of letters and digits, for example, %s or %08X. Move them to the translated message ‘as is’.

Checking The Translation

Translating all the messages takes some time, and it would be very handy if we had some way to check what is done and how much is left to do. There is another program in the Localization folder, which does exactly that. Double-click MsgChecker.exe and select the target language.

Message Checker screen

Message Checker shows detailed statistics, both total, and for individual files.

Appendix: Language File Format

Normally, you should not care about the format of language files - Message Editor takes care of everything. This information may come useful when you wish to fix some message in a base .409 file.

The first line of message file contains a brief description that both Message Editor and Message Checker show. The Kryptel message processor simply skips first line. The second and the following lines is a sequence of message definitions.

A message definition must start with the dot (.) character in the first position. All lines not starting with dot and which are not part of a long message definition (see below) are considered comments and ignored.

There are two formats of message definition - short and long.

A short definition occupies exactly one line and have the following format:

.MessageId Message text

Example:

.SHORT_MESSAGE_ID This is a short message.

A long definition may contain several lines of text and is delimited by a line containing a single dot (.) character in the first position.

.MessageId
Line 1
Line 2
. . .
Line N
.

Example:

.LONG_MESSAGE_ID
This is the first line of a long message...

A multiline message is shown exactly as it is defined
in the message file; the localization library preserves
line feeds and white spaces - except white spaces at
the end of the lines, which are truncated.

The last line of a rather long message...
.

All lines, which are not started with the dot character, and which are not part of a long message definition, are considered a comment and ignored.

Appendix: Language Codes

Language Codes Sorted by Language Name

Name Code Name Code Name Code
Afrikaans (South Africa) 436 Estonian (Estonia) 425 Persian 429
Albanian (Albania) 41C Faroese (Faroe Islands) 438 Polish (Poland) 415
Amharic (Ethiopia) 45E Filipino (Philippines) 464 Portuguese (Brazil) 416
Arabic (Algeria) 1401 Finnish (Finland) 40B Portuguese (Portugal) 816
Arabic (Bahrain) 3C01 French (Belgium) 80C Punjabi (India) 446
Arabic (Egypt) C01 French (Canada) C0C Romanian (Romania) 418
Arabic (Iraq) 801 French (France) 40C Romansh (Switzerland) 417
Arabic (Jordan) 2C01 French (Luxembourg) 140C Russian (Russia) 419
Arabic (Kuwait) 3401 French (Monaco) 180C Sami, Northern (Norway) 43B
Arabic (Lebanon) 3001 French (Switzerland) 100C Sanskrit (India) 44F
Arabic (Libya) 1001 Frisian (Netherlands) 462 Serbian (Cyrillic, Serbia and Montenegro (Former)) C1A
Arabic (Morocco) 1801 Galician (Galician) 456 Serbian (Latin, Serbia and Montenegro (Former)) 81A
Arabic (Oman) 2001 Georgian (Georgia) 437 Setswana (South Africa) 432
Arabic (Qatar) 4001 German (Austria) C07 Sinhala (Sri Lanka) 45B
Arabic (Saudi Arabia) 401 German (Germany) 407 Slovak (Slovakia) 41B
Arabic (Syria) 2801 German (Liechtenstein) 1407 Slovenian (Slovenia) 424
Arabic (Tunisia) 1C01 German (Luxembourg) 1007 Spanish (Argentina) 2C0A
Arabic (U.A.E.) 3801 German (Switzerland) 807 Spanish (Bolivarian Republic of Venezuela) 200A
Arabic (Yemen) 2401 Greek (Greece) 408 Spanish (Bolivia) 400A
Armenian (Armenia) 42B Gujarati (India) 447 Spanish (Chile) 340A
Assamese (India) 44D Hebrew (Israel) 40D Spanish (Colombia) 240A
Azeri (Cyrillic, Azerbaijan) 82C Hindi (India) 439 Spanish (Costa Rica) 140A
Azeri (Latin, Azerbaijan) 42C Hungarian (Hungary) 40E Spanish (Dominican Republic) 1C0A
Basque (Basque) 42D Icelandic (Iceland) 40F Spanish (Ecuador) 300A
Belarusian (Belarus) 423 Igbo (Nigeria) 470 Spanish (El Salvador) 440A
Bengali (Bangladesh) 845 Indonesian (Indonesia) 421 Spanish (Guatemala) 100A
Bengali (India) 445 Irish (Ireland) 83C Spanish (Honduras) 480A
Bosnian (Latin, Bosnia and Herzegovina) 141A isiXhosa (South Africa) 434 Spanish (Mexico) 80A
Bulgarian (Bulgaria) 402 isiZulu (South Africa) 435 Spanish (Nicaragua) 4C0A
Catalan (Catalan) 403 Italian (Italy) 410 Spanish (Panama) 180A
Chinese (Simplified, PRC) 804 Italian (Switzerland) 810 Spanish (Paraguay) 3C0A
Chinese (Simplified, Singapore) 1004 Japanese (Japan) 411 Spanish (Peru) 280A
Chinese (Traditional, Hong Kong S.A.R.) C04 Kannada (India) 44B Spanish (Puerto Rico) 500A
Chinese (Traditional, Macao S.A.R.) 1404 Kazakh (Kazakhstan) 43F Spanish (Spain, International Sort) C0A
Chinese (Traditional, Taiwan) 404 Khmer (Cambodia) 453 Spanish (Spain, Traditional Sort) 40A
Croatian (Croatia) 41A Kiswahili (Kenya) 441 Spanish (Uruguay) 380A
Czech (Czech Republic) 405 Konkani (India) 457 Swedish (Finland) 81D
Danish (Denmark) 406 Korean (Korea) 412 Swedish (Sweden) 41D
Divehi (Maldives) 465 Kyrgyz (Kyrgyzstan) 440 Syriac (Syria) 45A
Dutch (Belgium) 813 Lao (Lao P.D.R.) 454 Tajik (Cyrillic, Tajikistan) 428
Dutch (Netherlands) 413 Latvian (Latvia) 426 Tamil (India) 449
English (Australia) C09 Lithuanian (Lithuania) 427 Tatar (Russia) 444
English (Belize) 2809 Macedonian (Former Yugoslav Republic of Macedonia) 42F Telugu (India) 44A
English (Canada) 1009 Malay (Brunei Darussalam) 83E Thai (Thailand) 41E
English (Caribbean) 2409 Malay (Malaysia) 43E Tibetan (PRC) 451
English (India) 4009 Malayalam (India) 44C Turkish (Turkey) 41F
English (Ireland) 1809 Maltese (Malta) 43A Turkmen (Turkmenistan) 442
English (Jamaica) 2009 Maori (New Zealand) 481 Ukrainian (Ukraine) 422
English (New Zealand) 1409 Marathi (India) 44E Upper Sorbian (Germany) 42E
English (Republic of the Philippines) 3409 Mongolian (Cyrillic, Mongolia) 450 Urdu (Islamic Republic of Pakistan) 420
English (South Africa) 1C09 Mongolian (Traditional Mongolian, PRC) 850 Uzbek (Cyrillic, Uzbekistan) 843
English (Trinidad and Tobago) 2C09 Nepali (Nepal) 461 Uzbek (Latin, Uzbekistan) 443
English (United Kingdom) 809 Norwegian, Bokmal (Norway) 414 Vietnamese (Vietnam) 42A
English (United States) 409 Norwegian, Nynorsk (Norway) 814 Welsh (United Kingdom) 452
English (Zimbabwe) 3009 Oriya (India) 448

Language Codes Sorted by Language Code

Code Name Code Name Code Name
401 Arabic (Saudi Arabia) 43B Sami, Northern (Norway) C07 German (Austria)
402 Bulgarian (Bulgaria) 43E Malay (Malaysia) C09 English (Australia)
403 Catalan (Catalan) 43F Kazakh (Kazakhstan) C0A Spanish (Spain, International Sort)
404 Chinese (Traditional, Taiwan) 440 Kyrgyz (Kyrgyzstan) C0C French (Canada)
405 Czech (Czech Republic) 441 Kiswahili (Kenya) C1A Serbian (Cyrillic, Serbia and Montenegro (Former))
406 Danish (Denmark) 442 Turkmen (Turkmenistan) 1001 Arabic (Libya)
407 German (Germany) 443 Uzbek (Latin, Uzbekistan) 1004 Chinese (Simplified, Singapore)
408 Greek (Greece) 444 Tatar (Russia) 1007 German (Luxembourg)
409 English (United States) 445 Bengali (India) 1009 English (Canada)
40A Spanish (Spain, Traditional Sort) 446 Punjabi (India) 100A Spanish (Guatemala)
40B Finnish (Finland) 447 Gujarati (India) 100C French (Switzerland)
40C French (France) 448 Oriya (India) 1401 Arabic (Algeria)
40D Hebrew (Israel) 449 Tamil (India) 1404 Chinese (Traditional, Macao S.A.R.)
40E Hungarian (Hungary) 44A Telugu (India) 1407 German (Liechtenstein)
40F Icelandic (Iceland) 44B Kannada (India) 1409 English (New Zealand)
410 Italian (Italy) 44C Malayalam (India) 140A Spanish (Costa Rica)
411 Japanese (Japan) 44D Assamese (India) 140C French (Luxembourg)
412 Korean (Korea) 44E Marathi (India) 141A Bosnian (Latin, Bosnia and Herzegovina)
413 Dutch (Netherlands) 44F Sanskrit (India) 1801 Arabic (Morocco)
414 Norwegian, Bokmal (Norway) 450 Mongolian (Cyrillic, Mongolia) 1809 English (Ireland)
415 Polish (Poland) 451 Tibetan (PRC) 180A Spanish (Panama)
416 Portuguese (Brazil) 452 Welsh (United Kingdom) 180C French (Monaco)
417 Romansh (Switzerland) 453 Khmer (Cambodia) 1C01 Arabic (Tunisia)
418 Romanian (Romania) 454 Lao (Lao P.D.R.) 1C09 English (South Africa)
419 Russian (Russia) 456 Galician (Galician) 1C0A Spanish (Dominican Republic)
41A Croatian (Croatia) 457 Konkani (India) 2001 Arabic (Oman)
41B Slovak (Slovakia) 45A Syriac (Syria) 2009 English (Jamaica)
41C Albanian (Albania) 45B Sinhala (Sri Lanka) 200A Spanish (Bolivarian Republic of Venezuela)
41D Swedish (Sweden) 45E Amharic (Ethiopia) 2401 Arabic (Yemen)
41E Thai (Thailand) 461 Nepali (Nepal) 2409 English (Caribbean)
41F Turkish (Turkey) 462 Frisian (Netherlands) 240A Spanish (Colombia)
420 Urdu (Islamic Republic of Pakistan) 464 Filipino (Philippines) 2801 Arabic (Syria)
421 Indonesian (Indonesia) 465 Divehi (Maldives) 2809 English (Belize)
422 Ukrainian (Ukraine) 470 Igbo (Nigeria) 280A Spanish (Peru)
423 Belarusian (Belarus) 481 Maori (New Zealand) 2C01 Arabic (Jordan)
424 Slovenian (Slovenia) 801 Arabic (Iraq) 2C09 English (Trinidad and Tobago)
425 Estonian (Estonia) 804 Chinese (Simplified, PRC) 2C0A Spanish (Argentina)
426 Latvian (Latvia) 807 German (Switzerland) 3001 Arabic (Lebanon)
427 Lithuanian (Lithuania) 809 English (United Kingdom) 3009 English (Zimbabwe)
428 Tajik (Cyrillic, Tajikistan) 80A Spanish (Mexico) 300A Spanish (Ecuador)
429 Persian 80C French (Belgium) 3401 Arabic (Kuwait)
42A Vietnamese (Vietnam) 810 Italian (Switzerland) 3409 English (Republic of the Philippines)
42B Armenian (Armenia) 813 Dutch (Belgium) 340A Spanish (Chile)
42C Azeri (Latin, Azerbaijan) 814 Norwegian, Nynorsk (Norway) 3801 Arabic (U.A.E.)
42D Basque (Basque) 816 Portuguese (Portugal) 380A Spanish (Uruguay)
42E Upper Sorbian (Germany) 81A Serbian (Latin, Serbia and Montenegro (Former)) 3C01 Arabic (Bahrain)
42F Macedonian (Former Yugoslav Republic of Macedonia) 81D Swedish (Finland) 3C0A Spanish (Paraguay)
432 Setswana (South Africa) 82C Azeri (Cyrillic, Azerbaijan) 4001 Arabic (Qatar)
434 isiXhosa (South Africa) 83C Irish (Ireland) 4009 English (India)
435 isiZulu (South Africa) 83E Malay (Brunei Darussalam) 400A Spanish (Bolivia)
436 Afrikaans (South Africa) 843 Uzbek (Cyrillic, Uzbekistan) 440A Spanish (El Salvador)
437 Georgian (Georgia) 845 Bengali (Bangladesh) 480A Spanish (Honduras)
438 Faroese (Faroe Islands) 850 Mongolian (Traditional Mongolian, PRC) 4C0A Spanish (Nicaragua)
439 Hindi (India) C01 Arabic (Egypt) 500A Spanish (Puerto Rico)
43A Maltese (Malta) C04 Chinese (Traditional, Hong Kong S.A.R.)