Oracle9iAS Portal Developer Kit

add_string function

Contained in package wwnls_api.

Call this function to add a string to the NLS subsystem.

This function should be called once for each new string to be added to the system. This function adds the specified string and returns a unique string ID that may be used to identify the string or to identify translations within the domain and sub-domain. The message strings loaded into the table first, become the base strings for the schema.

Notes:

  • This function performs a check to ensure that the string name is unique within the domain, sub-domain, and language.

  • If there are multiple translations of a given string, the translations should be added with the set_string function after using the add_string function.

function add_string

(

p_domain in wwnls_strings$.domain%type,

p_sub_domain in wwnls_strings$.sub_domain%type default 'all',

p_name in wwnls_strings$.name%type default null,

p_language in wwnls_strings$.language%type,

p_text in wwnls_strings$.text%type

)

return wwnls_strings$.id%type;

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_domain

The domain in which the message string should be added.

Example: WWS

Datatype: in wwnls_strings$.domain%type

p_sub_domain

The sub-domain in which the message string should be added.

Example: TEXT, NAVBAR

Datatype: in wwnls_strings$.sub_domain%type
Default: 'all'

p_name

A unique name for a message string.

Notes:

  • If nothing is passed in, the string ID is used as the name.

  • If null is specified, the string ID is used as the name.

Datatype: in wwnls_strings$.name%type
Default: null

p_language

The NLS language name constant for the language of the string to be added.

Example: wwnls_api.AMERICAN

Datatype: in wwnls_strings$.language%type

p_text

The message string text to be added.

Datatype: in wwnls_strings$.text%type

Returns:

This function returns a unique string ID.

Exceptions:

  • If a validation error occurs, an NLS_VALIDATION_EXCEPTION is raised.

  • If this function fails to execute, an NLS_EXECUTION_EXCEPTION is raised.

Example:

if p_input_format_1 is not null then

l_input_format_id := wwnls_api.add_string

(

p_domain => 'WWC',

p_sub_domain => 'EXPLORER',

p_name => 'ATTR_INTYPE_FMT',

p_language => wwnls_api.AMERICAN,

p_text => 'INPUT FORMAT'

);

end if;

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio