|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Language localization, General information
back to Language localization instructions All string tables must have a ".lng" file type. The name of the file may anything you choose--any file with a ".lng" file type is recognized as a string table file. For string tables distributed on this web site, we use this naming convention: pfactory_xyz.lng Where "xyz" is a Microsoft 3-letter language code. See Language Code and Scripts at Microsoft's web site for the table of all language codes. For example, the U.S. English file is "pfactory_enu.lng". The initial line(s) of the file should be comment lines indicating the version, date and authors of the file. For example, # Language file version: v3.1.deu.12 Date: 2004-01-13.
The string table file contains a line for each string in the program. The line begins with the string number, then one or more spaces or tabs and then the string value in double quotes. For example: 10262 "Focal length" Comments start with a "#" character, and blank lines may be used to improve readability. To help you understand the usage of the strings, each string in the pfactory_enu.lng file begins with a three letter code and a "~" character:
These special codes are automatically removed by The Panorama Factory when it loads the string table. This means you must not use "~" as the fourth character in a translated message. You may wish to remove these special codes yourself as you translate the strings so that you can easily find strings that have not been translated by searching for "~". You may include the following special character sequences in your strings:
Note: There are two ways to create a newline:
Many strings have other strings or numbers inserted into them. These are indicated by the presence of codes like:
The number after the percent sign indicates the word order in the U.S. English translation. The insertions may be rearranged if a different language requires a different word ordering. Some grammatical constructions used in The Panorama Factory may be challenging to translate into other languages. For example, The Panorama Factory uses the gerund form of verbs to indicate a task that is currently being performed, for example "Aligning images 3 and 4 of 10." Some languages (e.g. German) do not have gerunds. You may need to reword these messages or change their basic construction, for example "Images 3 and 4 of 10 -- Align". Sometimes words or phrases are inserted into other strings. In some cases it may be difficult guarantee grammatical correctness because of assumptions made on the basis of English grammar. In these cases, you may wish to use double-quotes around the insertions to set them apart from the flow of the main text, effectively converting them into phrases that function as nouns. For example, dialog box names, e.g. "Alignment properties", are inserted into string 122, "Profiles containing settings for %1". If grammatical correctness cannot be achieved by the wording of string 122, you may wish to surround the insertion with "", e.g. "Profiles containing settings for ""%1""". Most strings on dialog boxes have limited space. The dialog boxes generally allow for some expansion from the English, but typically not more than 30% to 50% expansion. You may need to abbreviate or otherwise limit some strings in order that the translated strings will fit. Some strings are displayed on message boxes. The message boxes are resized according to the size of the string being displayed. This means that these messages may grow arbitrarily. The strings for menu commands have three parts:
These three parts are combined into one string in this way: command\taccelerator\nprompt string For example: &New project\tCtrl+N\nCreate a new project The description of the accelerator key should be translated, but the actual keyboard character may not be changed. The accelerator key should be omitted for commands that do not have accelerator keys: &Import images...\nImport new images The accelerator key and prompt string should be omitted for menu titles: &File To choose a shortcut key for the menu command (shown as an underlined character on the menu command), place the "&" character before a letter in the menu command. You may select a letter that makes sense in your local language--you do not have to use the same letter as the English command. To display the "&" character in the menu command (e.g. License & Registration), double the character: License && Registration To choose a shortcut key for the dialog box control (shown as an underlined character on the control's label), place the "&" character before a letter in the label. You may select a letter that makes sense in your local language--you do not have to use the same letter as the English label. To display the "&" character in the menu command (e.g. License & Registration), double the character: Focal length && barrel correction To load your string table, open the Options dialog box (Tools menu). Select your string table by clicking its name. If it is already selected, you must still click its name in order to enable the OK and Apply buttons. Then click the OK or Apply button to load the string table. Holding the ALT key when you click the name of a string table causes The Panorama Factory to insert the string number at the beginning of each displayed string. This can help you to locate the string when you see something incorrect on the screen. If errors are encountered when loading the string table, The Panorama Factory will display a message box. The details of the error(s) are recorded in the file language.log in The Panorama Factory's application folder. This is normally:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Revised: April 28, 2004 © 1999-2005 Smoky City Design, LLC and John Strait |