pike.hubbe.net

[Top]
Gettext
previousGettext Gettext.dcgettext()next

Method Gettext.bindtextdomain()


Method bindtextdomain

string Gettext.bindtextdomain(string|void domainname, object string|voiddirname)

Description

The bindtextdomain() function binds the path predicate for a message domain domainname to the value contained in dirname. If domainname is a non-empty string and has not been bound previously, bindtextdomain() binds domainname with dirname.

If domainname is a non-empty string and has been bound previously, bindtextdomain() replaces the old binding with dirname. The dirname argument can be an absolute or relative pathname being resolved when gettext(), dgettext(), or dcgettext() are called. If domainname is null pointer 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.

The return value from bindtextdomain() is a string containing dirname or the directory binding associated with domainname if dirname is void. If no binding is found, the default locale path is returned. If domainname is void or an empty string, bindtextdomain() takes no action and returns a 0.

Parameter domainname

The domain to query or bind a path to.

Parameter domainname
Parameter dirname

The directory name to bind to the choosen domain.

See also

Gettext.textdomain, Gettext.gettext, Gettext.dgettext, Gettext.dcgettext, Gettext.setlocale, Gettext.localeconv


Extracted from Pike v7.3 release 11 at 2001-11-03.