Loading the Message Database
Rogue Wave® Views automatically loads the correct message database, which is located in the locale/<ll_TT.encoding> directory.
For example, if you work in an ISO 8859-1 French environment, the following call:
display->getDatabase()->read("/my-directory-path/my-file.dbm");
will automatically look for a file in the following directory on UNIX systems:
/my-directory-path/locale/fr_FR.ISO-8859-1/my-file.dbm
and in the following directory on Microsoft Windows systems:
/my-directory-path/locale/fr_FR.windows-1252/my-file.dbm
Note: In versions of Rogue Wave Views before 3.0, users had to set the ILVLANG environment variable to the language they wanted to use. |
Overriding the Default Behavior
If you want to override the default behavior and have Rogue Wave Views use another display language, you can use the ILVLANG environment variable. On a XPG4-compliant UNIX system, you can also use the LC_MESSAGES environment variable. Rogue Wave Views will look for the message database files in the following order:
On UNIX Systems
1. ILVLANG
2. LC_MESSAGES
3. LC_CTYPE category of your running locale
On Windows Systems
1. ILVLANG
2. LC_CTYPE category of your running locale
Note: If you want to change your Rogue Wave Views display language by overriding it with LC_MESSAGES or ILVLANG environment variables, you need to be sure your program runs in the same or a stronger encoding (that is, a superset of the encoding) than the one you plan to use for your messages. This is because the .dbm files are read based on the Rogue Wave Views locale encoding your program runs in. For example, if you run a program in Japanese or French, you can always read English messages, the opposite is not true. |
Overriding the Default Behavior Using the LANG Resource
On UNIX Systems
You can set the ILVLANG environment variable to use a language other than the default. ILVLANG applies to Rogue Wave Views applications only and is system-independent.
For example, if your current Rogue Wave Views locale is French and you want to see Spanish messages, you could use ILVLANG=es_ES on any UNIX system. Your settings would then be as follows:
Current Views locale running: fr_FR.ISO-8859-1
Current Views display language: es_ES
Looking under directories: .../locale/es_ES.ISO-8859-1/
In this case, only the messages in your Rogue Wave Views applications will be displayed in Spanish. The system messages are not affected.
On Microsoft Windows Systems
You can set the lang variable in your views.ini file to use a language other than the default. For example, if your current Rogue Wave Views locale is French and you want to see Spanish messages, you could use lang=es_ES. Your settings would then be as follows:
Current Views locale running: fr_FR.windows-1252
Current Views display language: es_ES
Looking under directories: .../locale/es_ES.windows-1252/
Overriding the Default Behavior using LC_MESSAGES (UNIX only)
You can set the LC_MESSAGES environment variable to use a language other than the default. You should note that if you use the LC_MESSAGES environment variable this will override all system messages as well.
For example, if your current Rogue Wave Views locale is French and you want to see Italian messages, you could use LC_MESSAGES=it_IT.iso88591 on an HP-UX system or LC_MESSAGES=it on a Solaris system. Your settings would then be as follows:
Current Views locale running: fr_FR.ISO-8859-1
Current Views display language: it_IT
Looking under directories: .../locale/it_IT.ISO-8859-1/
In this case, not only will your Rogue Wave Views messages appear in Italian, but all your system messages will be in Italian as well.
Version 5.7
Copyright © 2013, Rogue Wave Software, Inc. All Rights Reserved.