Skip Headers

Oracle® Application Server 10g Globalization Guide
10g (9.0.4)
Part No. B10380-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous Next  

5 Configuring Oracle Application Server for Global Deployment

When developing and deploying global Internet applications with Oracle Application Server, you need to consider the following tasks:

Installing Oracle Application Server for Global Deployment

In addition to the schemas of the infrastructure components, such as Oracle Internet Directory (OID) and Distributed Configuration Management (DCM), the Oracle Application Server Infrastructure database stores data pertaining to many Oracle Application Server middle-tier components that are installed on top of it. These components include Portal, Wireless, Forms, Reports, and Discoverer. Therefore, it is important to choose the correct database character set for the infrastructure database at install time so that all of the dependent components are able to provide the same level of global support.

During the installation of the Oracle Application Server infrastructure database, you are prompted to choose the database character set you would like to use for the database. There are two basic scenarios that will determine which choice is best for your environment:

During installation of any Oracle Application Server 10g installation type, support for user-selected languages is automatically installed and configured. It includes the translation files and fonts being used in the product. Additionally, command-line language installation is still supported.

If the required fonts are not available after installation, you can copy them from the Utilities CD included in the Oracle Application Server CD pack, or from http://metalink.oracle.com into the $ORACLE_HOME/jdk/jre/lib/fonts directory.

Configuring Oracle HTTP Server and OC4J for Global Deployment

This section contains the following topics related to configuring Oracle HTTP Server for multilingual support:

About Manually Editing HTTP Server and OC4J Configuration Files

If you edit Oracle HTTP Server or OC4J configuration files manually, instead of using Oracle Enterprise Manager, 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 consoles. The commands are as follows:

  • To notify the DCM repository of changes made to Oracle HTTP Server configuration files:

    ORACLE_HOME/dcm/bin/dcmctl updateConfig ohs
    
    
  • To notify the DCM repository of changes made to OC4J configuration files:

    ORACLE_HOME/dcm/bin/dcmctl updateConfig oc4j
    
    
  • To notify the DCM repository of changes made to both Oracle HTTP Server and OC4J configuration files:

    ORACLE_HOME/dcm/bin/dcmctl updateConfig
    
    

Before you change configuration parameters, manually or using Oracle Enterprise Manager, 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

Configuring the NLS_LANG Parameter

The NLS_LANG parameter 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.


See Also:

Oracle9i Globalization Support Guide in the Oracle Database Documentation Library for a list of valid Oracle language, territory, and character set names

You can specify the NLS_LANG parameter in the Oracle HTTP Server and OC4J files. The Oracle HTTP Server and OC4J files where NLS_LANG can be specified are as follows:

  • $ORACLE_HOME/Apache/Apache/conf/httpd.conf

    This is the configuration of Oracle HTTP Server powered by Apache, and it defines the environment variables that are passed to Apache modules. If you want to explicitly specify the NLS_LANG parameter for CGI scripts such as Perl and SSI pages, you can add the following line to this file:

    SetEnv NLS_LANG language_territory.characterset
    
    

    Oracle HTTP Server is already configured to use the NLS_LANG shell environment variable in CGI scripts and SSI pages when NLS_LANG is not explicitly specified as described above. It does so by putting the following line into this file:

    PassEnv NLS_LANG
    
    
  • $ORACLE_HOME/Apache/Apache/bin/apachectl

    This is the Oracle HTTP Server startup script used in UNIX. If you want to start Oracle HTTP Server directly from apachectl, you can specify the following line in this script file to define an NLS_LANG value:

    NLS_LANG=language_territory.characterset; export NLS_LANG
    
    
  • $ORACLE_HOME/opmn/conf/opmn.xml

    Oracle Process Management and Notification (OPMN) is used to manage Oracle HTTP Server and OC4J instances. The opmn.xml configuration file allows you to specify the NLS_LANG environment variable for Oracle HTTP Server and OC4J processes through the following XML construct:

    <environment>
    ...
    <prop name="NLS_LANG" value="language_territory_characterset" />
    ...
    </environment>
    
    

    This construct can be specified at the Oracle Application Server instance level where it applies to all Oracle HTTP Server and OC4J instances belonging to the Oracle Application Server instance. It can also be specified for the individual Oracle HTTP Server or OC4J instance where it only applies to the corresponding instance.

  • $ORACLE_HOME/Apache/modplsql/conf/dads.conf

    This file defines database access descriptors (DADs) for mod_plsql to use when creating a database connection. You can specify the NLS_LANG value for the corresponding DAD. 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>
    
    

    Note that, when the Transfer Mod of a DAD is CHAR instead of RAW, the NLS_LANG character set of the DAD should be the same as that of the database character set for mod_plsql to work properly.

  • $ORACLE_HOME/Apache/Jserv/etc/jserv.properties

    If JServ is needed in your environment, then you need to add or modify the following line in this file to define the appropriate NLS_LANG value:

    wrapper.env=NLS_LANG=language_territory.characterset
    
    

If you do not explicitly specify the NLS_LANG environment variable in these files as described above, Oracle HTTP Server and OC4J will use the value set as follows:

  • On UNIX: The NLS_LANG shell environment variable when Oracle HTTP Server and OC4J are invoked

  • On Windows: The NLS_LANG registry key at \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACE\HOMEn in the Win32 registry

Preconfigured NLS_LANG Values

The Oracle Application Server installation pre-configures NLS_LANG values in the following Oracle HTTP Server and OC4J files for you based on the locale of the runtime environment on which the product is installed.

  • $ORACLE_HOME/Apache/Apache/bin/apachectl (for UNIX platforms)

  • $ORACLE_HOME/opmn/conf/opmn.xml/opmnctl (for UNIX platforms)

The pre-configured NLS_LANG values in the apachectl and opmnctl scripts are specified as follows:

NLS_LANG=${NLS_LANG=language_territory.characterset}; export NLS_LANG

The above line means that the pre-configured NLS_LANG values are used only when the shell environments from which the scripts are invoked have no defined the NLS_LANG environment variable. If you want to use an NLS_LANG value regardless of the shell environment, you can change this line to:

NLS_LANG=language_territory.characterset; export NLS_LANG

The NLS_LANG parameter controls the locale of the runtime environment on which OPMN runs. It should correspond to the default locale of the middle-tier runtime environment, which is the default locale of the operating system. The same NLS_LANG parameter is inherited by the OPMN managed processes, such as Oracle HTTP Server and OC4J, unless it is explicitly specified with a different value in opmn.xml.

For Windows platforms, the pre-configured NLS_LANG is automatically registered in the Win32 registry as the NLS_LANG registry key at \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMEn. The NLS_LANG value in this registry key controls the locale of the runtime environment on which OPMN and its managed processes run.

The pre-configured NLS_LANG values are the best values derived from the runtime locale during product installation, and may not represent the appropriate value for your Oracle HTTP Server and OC4J configurations. You may need to alter these values according to your specific requirements and runtime environments.


Setting NLS_LANG for a Monolingual Application Architecture

Set the NLS_LANG parameter 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 5-1 lists the NLS_LANG values for the most commonly used locales.

Table 5-1 NLS_LANG Values for Commonly Used Locales

Locale NLS_LANG Value
Arabic (Egypt) ARABIC_EGYPT.AR8MSWIN1256
Arabic (U.A.E.) ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
Chinese (Taiwan) TRADITIONAL CHINESE_TAIWAN.ZHT16MSWIN950
Chinese (P.R.C.) SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Czech CZECH_CZECH REPUBLIC.EE8MSWIN1250
Danish DANISH_DENMARK.WE8MSWIN1252
Dutch DUTCH_THE NETHERLANDS.WE8MSWIN1252
English (United Kingdom) ENGLISH_UNITED KINGDOM.WE8MSWIN1252
English (U.S.A.) AMERICAN_AMERICA.WE8MSWIN1252
Finnish FINNISH_FINLAND.WE8MSWIN1252
French (Canada) CANADIAN FRENCH_CANADA.WE8MSWIN1252
French (France) FRENCH_FRANCE.WE8MSWIN1252
Germany (German) GERMANY_GERMAN.WE8MSWIN1252
Greek GREEK_GREECE.EL8MSWIN1253
Hebrew HEBREW_ISRAEL.IW8MSWIN1255
Hungarian HUNGARIAN_HUNGARY.EE8MSWIN1250
Italian (Italy) ITALIAN_ITALY.WE8MSWIN1252
Japanese JAPANESE_JAPAN.JA16SJIS
Korean KOREAN_KOREA.KO16MSWIN949
Norwegian NORWEGIAN_NORWAY.WE8MSWIN1252
Polish POLISH_POLAND.EE8MSWIN1250
Portuguese (Brazil) BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252
Portuguese (Portugal) PORTUGUESE_PORTUGAL.WE8MSWIN1252
Romanian ROMANIAN_ROMANIA.EE8MSWIN1250
Russian RUSSIAN_CIS.CL8MSWIN1251
Slovak SLOVAK_SLOVAKIA.EE8MSWIN1250
Spanish (Spain) SPANISH_SPAIN.WE8MSWIN1252
Spanish (Latin American) LATIN AMERICAN SPANISH_AMERICA.WE8MSWIN1252
Swedish SWEDISH_SWEDEN.WE8MSWIN1252
Thai THAI_THAILAND.TH8TISASCII
Turkish TURKISH_TURKEY.TR8MSWIN1254


Setting NLS_LANG for a Multilingual Application Architecture

The language and territory components of the NLS_LANG parameter are not as important in the multilingual application architecture as they are in the 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 an appropriate value for NLS_LANG in a multilingual deployment is:

NLS_LANG=AMERICAN_AMERICA.UTF8

Configuring Transfer Mode for mod_plsql Runtime

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 back-end 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
            PlsqlNlsLanguage               AMERICAN_AMERICA.UTF8
            PlsqlTransferMode              RAW
</Location>

Note that if the value of PlsqlNlsLanguage has a space in it, the value must be enclosed in quotation marks. For example:

PlsqlNlsLanguage "SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

Configuring the Runtime Default Locale

This section describes how to initialize the runtime default locale for runtime environments that Oracle Application Server supports:

The default locale of a runtime environment controls the default locale-sensitive behavior of the applications, such as the character set used in file I/O operations, the language of the user interface, and the date format used. It needs to be properly set in order for applications relying on the default runtime locale to run with the expected locale-sensitive behavior. The default runtime locale is usually inherited from the default locale of the operating system or the locale of the runtime process.

The default runtime locale should be used as the user’s preferred locale for monolingual applications. For multilingual applications, the default runtime locale is used for any server-side I/O operations, such as logging messages.

mod_jserv Runtime for Java

For UNIX platforms, the LANG or LC_ALL variable defines the following:

  • The POSIX (also known as XPG4) locale used for a process

  • How Java VM initializes its default locale

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.

OC4J Java Runtime

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 Solaris:

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

mod_plsql Runtime for PL/SQL and PL/SQL Server Pages

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 "Configuring the NLS_LANG Parameter".

mod_perl Runtime for Perl Scripts

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:


C/C++ Runtime

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 5-1 for a list of commonly used POSIX locales for Solaris

For UNIX platforms, define LC_ALL as follows:

  • In $ORACLE_HOME/Apache/Apache/conf/httpd.conf, add the following line:

    PassEnv LC_ALL

  • In $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.

Configuring Oracle Application Server Portal for Global Deployment

Oracle Application Server Portal is designed to allow application development and deployment in different languages. OracleAS Portal is configured with the languages that are selected in the Oracle Universal Installer (OUI) during the Oracle Application Server middle-tier installation. Languages that are configured show up in the Set Language portlet.

To configure additional languages after installation, the OracleAS Portal Configuration Assistant (OPCA) must be used in LANGUAGE mode. Once you have installed a language, OracleAS Portal allows you to specify the preferred locale and territory to be used for that language; for example, Australian English or Canadian French. See Appendix A for a list of languages and abbreviations that are available for OracleAS Portal.

Configuring Oracle Application Server Wireless for Global Deployment

When users access wireless services from their mobile devices, Oracle Application Server Wireless uses the user profile information from Oracle Internet Directory (OID) to determine the user’s preferred language. Administrators can select the language when creating a new user through the Oracle Application Server Wireless Tools. Users can change their preferred language through the Wireless Customization Tool.

Configuring Encoding for Outgoing Email Messages

When users send email messages from their mobile devices, Oracle Application Server Wireless sends the messages in the encoding specified in the encoding parameter of the PIM/Mail service.

You can change the default encoding for outgoing email messages by modifying the ORACLE_SERVICES_PIM_MAIL_MESSAGE_ENCODING parameter of the PIM/Mail master service.

Configuring Oracle Application Server Single Sign-On for Global Deployment

Oracle Application Server Single Sign-On is automatically configured with the languages that are selected in the Oracle Universal Installer (OUI) during the Oracle Application Server Infrastructure installation. To configure additional languages after installation, you need to 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.


See Also:

Oracle Application Server Single Sign-On Administrator’s Guide for detailed steps on configuring additional languages

Configuring Oracle Application Server Forms Services for Global Deployment

The NLS_LANG parameter 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. Oracle 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 parameter in the $ORACLE_HOME/forms90/server/default.env file. If you do not set the NLS_LANG parameter in the default.env file, then Forms Services uses the value set as follows:

You can have different NLS_LANG settings on the same Forms Server by specifying an alternate environment file. Use the envFile parameter in the formsweb.cfg file. To do this:

  1. Create two environment configuration files under $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
    
    
    

    A Japanese environment configuration file (ja.env) should contain the following lines:

        NLS_LANG=JAPANESE_JAPAN.JA16SJIS
        FORMS90_PATH=d:\ja
    
    
  2. In the formsweb.cfg file ($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 the URL for your forms servlet as follows:

        http://formsservermachine/forms90/f90servlet?config=ja
        http://formsservermaching/forms90/f90servlet?config=en
    

Configuring Oracle Application Server Reports Services for Global Deployment

The NLS_LANG parameter controls the language, territory, and character set used for database connections in an Oracle Application Server Reports Services 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. Oracle Net converts data to and from the specified character set when it retrieves data from or inserts data into the database.

Oracle Application Server Reports Services uses the value of the NLS_LANG parameter set as follows:


See Also:


Configuring Oracle Application Server Discoverer for Global Deployment

Oracle Application Server Discoverer can simultaneously support users with different locales. Users may explicitly control the locale used for the user interface, or they may allow Oracle Application Server Discoverer to automatically determine a default. The order of precedence for determining the language and locale is:

  1. Language and locale settings specified in the URL for Oracle Application Server Discoverer

  2. Language and locale settings specified in the Discoverer Connection (this is part of the Oracle Application Server Discoverer integration with Oracle Application Server Single Sign-On)

  3. Language and locale setting specified in the user’s browser

  4. Language and locale of Oracle Application Server


See Also:

Oracle Application Server Discoverer Configuration Guide for more information on using URL parameters with Discoverer.

Configuring Oracle Business Components for Java for Global Deployment

You can set the following Oracle 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.

Configuring a Centralized Unicode-enabled Database to Support Global Deployment

You can set up the centralized Oracle9i database to store Unicode data in the following ways:

It is good practice to configure the centralized Oracle9i database to support the following:

Example 5-1 shows part of a CREATE DATABASE statement that sets the recommended database character set and national character set.

Example 5-1 Specifying the Database Character Set and the 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
    ... ;