Method Locale.Gettext.bindtextdomain()
- Method
bindtextdomain
string
bindtextdomain(string
|void
domainname
,string
|void
dirname
)- Description
Binds the path predicate for a message
domainname
domainname to the directory name specified bydirname
.If
domainname
is a non-empty string and has not been bound previously, bindtextdomain() bindsdomainname
withdirname
.If
domainname
is a non-empty string and has been bound previously, bindtextdomain() replaces the old binding withdirname
.The
dirname
argument can be an absolute or relative pathname being resolved when gettext(), dgettext() or dcgettext() are called.If
domainname
is zero or an empty string, bindtextdomain() returns 0.User defined domain names cannot begin with the string
"SYS_"
. Domain names beginning with this string are reserved for system use.- Returns
The return value from bindtextdomain() is a string containing
dirname
or the directory binding associated withdomainname
ifdirname
is unspecified. If no binding is found, the default locale path is returned. Ifdomainname
is unspecified or is an empty string, bindtextdomain() takes no action and returns a 0.- See also