dget_text()
Get message text by defining locale domain.
Syntax
Parameters
Parameter | Definition |
---|---|
domain_name | file name for message catalog Use only characters that are permitted in file names. |
message_ID | text string that identifies a message |
Description
The dget_text() function returns a message that has a text string as the message ID. The get_text() and dcget_text() functions serve the same purpose, but dget_text() requires that you specify domain_name. You do not specify a locale category for dget_text(), because this function uses the MESSAGES category of the current locale. The domain_name and category determine the name of the catalog file and the directory path according to the following format:
The dget_text() function returns message_ID when it cannot find a message that matches the relevant message_ID, domain_name and category. It also returns message_ID when the current locale is the same as the CTYPE locale.
Example
The following is an example of the dget_text() function.
{
ret = dget_text(domain, msg_id);
printf("Message = %s \n", ret);
}
display_dget_text("test_msg", "hello");