Oracle9i Application Server Globalization Support Guide Release 2 (9.0.2) Part Number A92110-02 |
|
This chapter contains the following topics:
If you edit Oracle HTTP Server or OC4J configuration files manually, instead of using the Enterprise Manager Web site, you must use the DCM command-line utility dcmctl
to notify the DCM repository of the changes. Otherwise, your changes will not go into effect and will not be reflected in the Enterprise Manager Web site. The commands are as follows:
ORACLE_HOME/dcm/bin/dcmctl updateConfig ohs
ORACLE_HOME/dcm/bin/dcmctl updateConfig oc4j
ORACLE_HOME/dcm/bin/dcmctl updateConfig
Before you change configuration parameters, manually or using the Enterprise Manager Web site, you can save the current state of Oracle HTTP Server and OC4J configuration files and installed J2EE applications with the following command:
ORACLE_HOME/dcm/bin/dcmctl saveInstance -dir directory_name
You can then restore the state and back out of any subsequent changes that were made using the following command:
ORACLE_HOME/dcm/bin/dcmctl restoreInstance [ -dir directory_name ]
This section contains the following topics related to configuring Oracle HTTP Server for multilingual support:
The NLS_LANG
environment variable controls the language, territory, and character set used for database connections in an Internet application. Specify the value of NLS_LANG
in the following format, including the punctuation as shown:
language_territory.characterset
language
, territory
, and characterset
must be valid Oracle language, territory, and character set names. The specified language and territory are used to initialize the locale that determines the default date and time formats, number formats, and sorting sequence in a database session. The Oracle9i database converts data to and from the specified character set when it is retrieved from or inserted into the database.
Specify the NLS_LANG
environment variable in the Oracle HTTP Server files.
In the ORACLE_HOME/Apache/modplsql/cfg/dads.conf
file, specify the NLS_LANG
value for the database access descriptors (DADs). For example, you can specify the NLS_LANG
value for the /pls/scott
DAD as follows:
<Location /pls/scott> SetHandler pls_handler Order deny,allow Allow from all PlsqlDatabasePassword tiger PlsqlDatabaseUsername scott PlsqlDocumentPath docs PlsqlEnableConnectionPooling On PlsqlNlsLanguage <NLS_LANG value> </Location>
For Windows platforms, the Oracle9iAS installation initializes a default NLS_LANG
environment variable as the NLS_LANG
registry key in the following location:
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEn
The default NLS_LANG
value defined in the registry applies to the corresponding Oracle Home. The Oracle HTTP Server uses this default NLS_LANG
value when NLS_LANG
values are not explicitly specified in the configuration files as described above.
You should set the value of NLS_LANG
differently depending on whether you are deploying a monolingual or multilingual application. The following sections tell how to set NLS_LANG
:
Set the NLS_LANG
environment variable to specify the language, territory, and character set that correspond to the locale that its middle-tier server is configured to serve. If most clients are running on Windows platforms, then it is a good practice to use the NLS_LANG
character set that corresponds to the Windows code page of the locale. For example, when you configure the middle tier server to serve Japanese clients, then specify the following value for NLS_LANG
:
JAPANESE_JAPAN.JA16SJIS
JA16SJIS corresponds to code page 932 of the Japanese Windows operation system.
Table 3-1 lists the NLS_LANG
values for the most commonly used locales.
The language and territory components of the NLS_LANG
parameter are not as important in multilingual application architecture as they are in monolingual application architecture. A multilingual application needs to handle different locales dynamically and cannot rely on fixed settings. The application should always use the UTF-8 character set so that Unicode data can be retrieved from and inserted into the database. An example of a valid value for NLS_LANG
in a multilingual deployment is:
NLS_LANG=AMERICAN_AMERICA.UTF8
Only monolingual application designs require you to configure the runtime default locale. This section describes how to initialize the runtime default locale for runtime environments that Oracle9iAS supports:
For UNIX platforms, the LANG
or LC_ALL
variable defines:
To configure the Java VM for JServ, define the LANG
or LC_ALL
environment variable with a POSIX locale name in the jserv.properties file. For example, the following line in jserv.properties defines Japanese (Japan) to be the default locale of Java VM for Jserv on UNIX:
wrapper.env=LANG=ja_JP
The values for the LANG
and LC_ALL
environment variables should refer to the same POSIX locale available in your operating system. The LC_ALL
environment variable always overrides the LANG
environment variable if they are different.
The regional settings of the Control Panel control the default locale of the Java VM for JServ on Windows platforms. Change the regional settings to the desired locale from the Control Panel before starting Oracle HTTP Server.
Define the LANG
or LC_ALL
environment variable with a POSIX locale name in $ORACLE_HOME/opmn/conf/opmn.xml
. For example, the following line within the <environment>
tags in opmn.xml defines Japanese (Japan) to be the default locale of Java VM for OC4J on UNIX:
<environment> ... <prop name="LANG" value="ja_JP" /> ... </environment>
The regional settings of the Control Panel control the default locale of the Java VM for OC4J on Windows platforms. Change the regional settings to the desired locale from the Control Panel before starting Oracle HTTP Server.
PL/SQL and PL/SQL Server Pages run on an Oracle9i database in the context of a database session. Therefore, the NLS_LANG
parameter controls the runtime default locale. The NLS_LANG
parameter should be configured as described in "Setting NLS_LANG in a Monolingual Application Architecture".
Perl scripts run on the Perl interpreter that the mod_perl
module provides. The locale support in Perl is based on the POSIX locale available in the operating system. It uses the underlying POSIX C libraries as a foundation. To configure the Perl runtime default locale, follow the procedure described for the C/C++ runtime.
See Also:
|
The C/C++ runtime uses the POSIX locale system that the operating system provides. You can configure the locale system by defining the LC_ALL
or LANG
environment variable. Define LC_ALL
with a valid locale value that the operating system provides. These values are different on different operating systems.
See Also:
Table 2-1 for a list of commonly used POSIX locales for UNIX |
For UNIX platforms, define LC_ALL
as follows:
$ORACLE_HOME/Apache/Apache/conf/httpd.conf
, add the following line:
PassEnv LC_ALL
$ORACLE_HOME/Apache/Apache/bin/apachectl
, add the following line:
LC_ALL=${LC_ALL=OS_locale
}; export LC_ALL
For Windows platforms, the POSIX locale should inherit its value from the regional settings of the Control Panel instead of being specified in the LC_ALL
environment variable. Change the regional settings to change the default runtime POSIX locale.
The transfer mode of each database access descriptor (DAD) of the mod_plsql
runtime enables PL/SQL to construct HTML content and process HTML form input in different character sets. You must set the transfer mode with the appropriate value.
It is important to configure the transfer mode for the mod_plsql
module in the $ORACLE_HOME/Apache/modplsql/cfg/dads.conf
file where the DADs are specified.
The mod_plsql
module supports two transfer modes that you can configure in a DAD:
CHAR
mode: This is a default mode where dynamic HTML content is sent as VARCHAR2
data from the database to mod_plsql
. In this mode, the NLS_LANG
character set must be the same as that of the backend database character set.
RAW
mode: Dynamic HTML content is sent as RAW
data from the database to mod_plsql
and is subject to character set conversion in the database server where the PL/SQL procedures and PSPs run. Character set conversion happens only when the HTML page encoding is specified, either by the NLS_LANG
character set or by the charset
parameter specified in the OWA_UTIL.MIME_HEADER()
function call.
You should turn on the RAW
transfer mode in a DAD for both monolingual and multilingual Internet applications as follows:
<Location /pls/scott> SetHandler pls_handler Order deny,allow Allow from all PlsqlDatabasePassword tiger PlsqlDatabaseUsername scott PlsqlDatabaseConnectString local PlsqlDocumentPath docs PlsqlEnableConnectionPooling On PlsqlNlxLanguage AMERICAN_AMERICA.UTF8 PlsqlTransferMode RAW </Location>
Oracle9iAS Portal is translated into 29 different languages. This allows developers to work in their own language when they build portals. In addition, the self-service content management supports multiple languages so that end users can provide documents and other content in different languages. Those who view the content can see the version that corresponds to the language setting in the browser or to the language they have selected in the set language portlet. See Appendix A for a list of languages and abbreviations that are available for Oracle9iAS Portal.
To install languages when you install Oracle9iAS Portal, run the ptlasst.csh
script with -mode LANGUAGE
for each language that you want Oracle9iAS Portal to support. The ptlasst.csh
script is located in the following directory:
$ORACLE_HOME/ora9ias/assistants/opca dir
Running the ptlasst.csh
script with -mode LANGUAGE
invokes the Oracle Portal Configuration Assistant (OPCA) in the silent mode to install the language. Usage information on the ptlasst.csh
script is generated by running the script without any parameters.
Table 3-2 shows ptlasst.csh
script usage examples for different language requirement scenarios.
Table 3-3 lists the supported parameters for the ptlasst.csh
script in LANGUAGE
mode (-mode LANGUAGE
).
The character set for the mod_plsql
gateway must be the same as the customer database character set.
Oracle9iAS Single Sign-On supports 29 languages. English is the only language installed by default. The Single Sign-On login page does not display language selection buttons if other languages were not installed. As a result, no product accessed through Single Sign-On can run in non-English mode.
You need to install other languages in order to support these languages during Single Sign-On login. To install additional languages, execute the following command:
ORACLE_HOME/jdk/bin/java -jar ORACLE_HOME/sso/lib/ossoca.jar langinst lang make_ lang_avail ORACLE_HOME
In this command, lang
specifies the abbreviation code for the language to be installed. See Appendix A for a list of languages and their corresponding abbreviations. The value of make_lang_avail
specifies whether or not to make the language available. Enter 1
to make the language available, 0
otherwise.
The NLS_LANG
environment variable controls the language, territory, and character set that an Internet application uses for database connections. Specify the value of NLS_LANG
in the following format, including the punctuation as shown:
language_territory.characterset
language
, territory
, and characterset
must be valid Oracle language, territory, and character set names. The specified language and territory are used to initialize the locale that determines the default date and time formats, number formats, and sorting sequence in a database session. The Oracle9i Net converts data to and from the specified character set when it retrieves data from or inserts data into the database.
You can set the NLS_LANG
environment variable in the $ORACLE_HOME/forms90/server/default.env
file. If you do not set the NLS_LANG
environment variable in the default.env file, then Forms Services uses the value set as follows:
NLS_LANG
shell environment variable when Forms Server is invoked
NLS_LANG
setting at the \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\
FormsServerOracle_HOME
in the Win32 registry
You can have different NLS_LANG
settings on the same Forms Services by specifying an alternate environment file. Use the EnvFile parameter in the zone.properties file. To do this:
$ORACLE_HOME/forms90/server
. For example, an American environment configuration file (en.env) should contain the following lines:
NLS_LANG=AMERICAN_AMERICA.US7ASCII FORMS90_PATH=d:\us PATH=d:\ora90\bin
A Japanese environment configuration file (ja.env) should contain the following lines:
NLS_LANG=JAPANESE_JAPAN.JA16SJIS FORMS90_PATH=d:\jp PATH=d:\ora90\bin
$ORACLE_HOME/Apache/Jserv/servlets
), create a ListenerServlet alias that uses the file with the alternate environment variable settings. For example, create a Listener Servlet for the Japanese settings:
servlet.lservletJP.code=oracle.forms.servlet.ListenerServlet
$ORACLE_HOME/Apache/Jserv/servlets
), set the configFile
parameter for the ListenerServlet alias. The ConfigFileName
parameter specifies the physical path to the configuration file that contains the alternate environment variables. For example:
servlet.lservletJP.initArgs=configFileName=d:\ora90/forms90/server/formsweb. cfg
A sample zone.properties file for Windows might contain the following:
#for default setting (American) servlet.lservlet.initArgs=envfile=d:\ora90\forms90\server\default.env servlet.lservlet.code=servlet.oracle.forms.servlet.ListenerServlet #ListenerServlet alias for Japanese environment variables servlet.lservletJP.code=oracle.forms.servlet.ListenerServlet servlet.lservletJP.initArgs=envfile=d:\ora90\forms90\server\JpRes.env
$ORACLE_HOME/forms90/server
), set the envFile
parameter for the alternative setting. For example:
[ja] envFile=ja.env [en] envFile=en.env
Then specify the configuration name in your URL for forms servlet as follows:
http://formsservermachine/forms90/f90servlet?config=ja http://formsservermaching/forms90/f90servlet?config=en
The NLS_LANG
environment variable controls the language, territory, and character set used for database connections in an Internet application. Specify the value of NLS_LANG
in the following format, including the punctuation as shown:
language_territory.characterset
language
, territory
, and characterset
must be valid Oracle language, territory, and character set names. The specified language and territory are used to initialize the locale that determines the default date and time formats, number formats, and sorting sequence in a database session. The Oracle9i Net converts data to and from the specified character set when it retrieves data from or inserts data into the database.
You can set the value of the NLS_LANG
parameter as follows:
NLS_LANG
shell environment variable when Reports Services is invoked
\\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\%
Reports9iORACLE_HOME%
in the Win32 registry
Oracle9iAS Discoverer can simultaneously support users with different locales. Users may explicitly control the locale used for the user interface, or they may allow Oracle9iAS Discoverer to automatically determine a default. The order of precedence for determining the language and locale is:
To configure the user interface of Oracle9iAS Discoverer to use a specific language and locale, you must specify NLS
parameters as part of the URL used to access Discoverer. You can specify the following NLS
parameters as part of the URL:
There is one additional aspect of multilingual support configuration of which you should be aware. Discoverer displays data and metadata from the database in the language in which it was created. The user interface has been translated to multiple languages and all necessary resources are already installed. However, the language for the user interface may be different than the language of the information in the database, as well as any Discoverer metadata the administrator defined on that data.
For example, an administrator creates a folder in a Business Area and gives it a Korean name using Korean characters. A Discoverer user with an American-English locale sees all of the buttons, menus, and documentation in English. But if the user views the Business Area with the Korean name, the folder is still displayed in Korean. Discoverer does not dynamically translate the user's data.
To have both the user interface and the data in a specified language and locale, your Discoverer metadata, the End User Layer (EUL), must also use that language and locale. To truly support multiple languages, you must have multiple translations of your EUL. Users can specify the appropriate EUL as part of their Discoverer Connection. You may also specify the EUL in any URL used to access Discoverer. See the Oracle9iAS Discoverer Configuration Guide for more information.
The rest of this section describes how to create a translated EUL, which requires the Oracle9iAS Discoverer Administrator from the Internet Developer Suite (iDS).
To translate the EUL:
@dis5adm /connect eul_owner_name/password@dbname /export eex_file_name /external_element dctrans.xml
In the exported EEX file, you can find the <OraTranslatability>
element, which tells you the attributes to translate and limitations for the attribute.
<OraTranslatability>
element, you can extract strings to a translatable file format like XLIFF and translate them. You must use your own XML utility.
Specify the character set in the Oracle9iAS Clickstream Intelligence configurator screen.
Specify the language when you install ClickStream. ClickStream does not support multiple languages on a single instance.
You can set the following Oracle9i Business Components for Java (BC4J) properties:
Their default values are en
and US
, respectively.
You can set them at the command line, by modifying the jboserver.properties file, or with an applet parameter tag. All sessions share this locale to display messages.
You can set up the centralized Oracle9i database to store Unicode data in the following ways:
CHAR
datatypes (CHAR
, VARCHAR2
, and CLOB
)
NCHAR
datatypes (NCHAR
, NVARCHAR2
, and NCLOB
)
It is good practice to configure the centralized Oracle9i database to support:
CHAR
datatypes
Specify AL32UTF8 for the database character set when you create the centralized database.
NCHAR
datatypes
Specify AL16UTF16 for the national character set when you create the centralized database.
Example 3-1 shows part of a CREATE DATABASE
statement that sets the recommended database character set and national character set.
CREATE DATABASE myunicodedatabase CONTROL FILE REUSE LOGFILE '/u01/oracle/ubfdb/redo01.log' SIZE 1M REUSE '/u01/oracle/utfdb/redo02.log' SIZE 1M REUSE DATAFILE '/u01/oracle/utfdbsystem01.dbf' SIZE 10M REUSE AUTOEXTENT ON NEXT 10M MAXSIZE 200M CHARACTER SET UTF8 NATIONAL CHARACTER SET AL16UTF16 ... ;
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|