virtual tour example

home gallery product info downloads buy now support learn more search

product info

features
system requirements
screen shots
what's new
languages

what they're saying
guestbook
license
batch module
batch license

Language localization, General information

back to Language localization instructions


File name and file header

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.
# Translated by Johann Tonsing, Matthias Fliegner,
#               Gerald Nipp, Frank Olzog and
#               Fritz Seyffert.

v3.1 The version of The Panorama Factory this string table was designed for.  Version mismatches are not serious problems.  A version mismatch will normally result only in some strings remaining untranslated.
deu The Microsoft 3-letter language code.
12 The release number of the string table file.  We recommend that you increase it every time you release the file, even if you are only releasing it to other people for internal review.  It does not matter how large this number becomes.
2004-01-13 The release date of the file in yyyy-mm-dd format.  We recommend that you update it every time you release the file, even if you are only releasing it to other people for internal review.

top


String table syntax

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:

  dlg~ A string displayed on a dialog box or Wizard panel, usually a label for a button, text field, group box, etc.
  tip~ A longer string displayed on a dialog box or Wizard panel containing a message explaining something.
  ttl~ The title of a dialog box.
  wiz~ The title of a Wizard panel.
  cmd~ A menu name or menu command string.  See Menu commands.
  msg~ A message displayed on a message box.  These strings are essentially unlimited in length because message boxes automatically resize to fit their contents.
  oth~ Other strings that do not readily fit into another category.

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:

  \n Converted to a newline character (but see Note below).
  %n Converted to a newline character (but see Note below).
  \t Converted to a tab character.
  \\ A single \ character within the string.
  "" A single " character within the string.
  & Precedes an shortcut key on a menu or dialog label.
  && A single & character within the string.

Note: There are two ways to create a newline:

  \n Preferred for formatted messages (e.g. message box text).  This newline is processed properly for formatting the message with line breaks every 80 character.
  %n Required for a few strings (e.g. menu commands) as noted in the comments preceding the strings.

top


Substitutions

Many strings have other strings or numbers inserted into them.  These are indicated by the presence of codes like:

  • %1 Inserts another string.
  • %2!d! Inserts a decimal integer.

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.

top


Grammatical considerations

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""".

top


String length considerations

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.

top


Menu commands

The strings for menu commands have three parts:

  • The command name.
  • The prompt string (shown in the status line at the bottom of The Panorama Factory window when you hover over the menu item).
  • The description of the accelerator key (shown to the right of the menu item).

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

top


Dialog box controls

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

top


Loading your string table

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.

top


String table error log

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:

c:\Program Files\Smoky City Design\The Panorama Factory\language.log

top


Revised: April 28, 2004

© 1999-2005 Smoky City Design, LLC and John Strait