Important This documentation space contains information about PATROL Agents when deployed in a TrueSight Operations Management environment. If you are a BMC Helix Operations Management user, see PATROL Agent 21.3 for BMC Helix Operations Management.

text_domain()


Set or get the name of the current domain.

Syntax

text_domain(domain_name)

Parameter

Parameter

Definition

domain_name

file name for message catalog Use only characters that are permitted in file names. 

Valid Values 
0, "", or any valid domain name

*Default* 
messages

Description

The text_domain() function sets or gets the name of the current domain. The domain_name determines the name of a string-based catalog file according to the following format:

PATROL_HOME/lib/nls/locale/locale_name/ML_category/domain_name.bo

 

Using 0 as domain_name causes text_domain() to return the value of the current domain name. When domain_name is the NULL character (""), text_domain() sets the current domain to the default value (messages). Using a valid domain name fordomain_name sets this value as the domain. When text_domain() successfully sets the domain, it returns the new value of the domain. You may want to use text_domain() before get_text() because get_text() uses the current setting of the domain name.

Note

This function provides support for internationalized PSL scripts. For more information about internationalization, seePATROL Script Language Reference Manual Volume 1 --PSL Essentials. 

Example

The following example demonstrates the text_domain() function.

ret = text_domain(0);
printf("Current domain is %s\n", ret);
ret = text_domain("test_msg");
printf("Domain set to %s \n", ret);
ret = text_domain("");
printf("Domain set to default value of %s \n", ret);

 

The previous example produces the following output:

Current domain is messages
Domain set to test_msg
Domain set to default value of messages

 

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*