header inti/i18n.h

Name

header inti/i18n.h --  Message catalog and locale functionality

Declared in this header

Functions.
const char * _ (const char * str)
const char * _ (const string & str)
const char * _ (const char * str, const char * domain)
const char * _ (const string & str, const char * domain)
const char * set_domain_directory (const char * domain, const char * directory_name)
const char * set_domain_directory (const string & domain, const string & directory_name)
const char * set_translation_domain (const char * domain)
const char * set_translation_domain (const string & domain)

Description

Global functions

function Inti::_

const char * _ (const char * str)

The Inti::_() function looks up a string in the default message catalog, and returns a translated string. If no translation exists, the original string is returned. The default message catalog is specified with Inti::set_translation_domain().

strString to be translated.

function Inti::_

const char * _ (const string & str)

The Inti::_() function looks up a string in the default message catalog, and returns a translated string. If no translation exists, the original string is returned. The default message catalog is specified with Inti::set_translation_domain().

strString to be translated.

function Inti::_

const char * _ (const char * str, const char * domain)

The Inti::_() function looks up a string in the message catalog, and returns a translated string. This version takes a translation domain argument; a translation domain is a string identifier for your particular library or application that serves as an identifier for a message catalog. Only the message catalog for the given domain will be searched for a translation. Applications typically do not need to specify a translation domain because they can use Inti::set_translation_domain() to specify the default domain, but libraries should specify the domain each time rather than setting the global default domain.

strString to translate.
domainDomain (message catalog name) where the translation should be found.

function Inti::_

const char * _ (const string & str, const char * domain)

The Inti::_() function looks up a string in the message catalog, and returns a translated string. This version takes a translation domain argument; a translation domain is a string identifier for your particular library or application that serves as an identifier for a message catalog. Only the message catalog for the given domain will be searched for a translation. Applications typically do not need to specify a translation domain because they can use Inti::set_translation_domain() to specify the default domain, but libraries should specify the domain each time rather than setting the global default domain.

strString to translate.
domainDomain (message catalog name) where the translation should be found.

function Inti::i18n::set_domain_directory

const char * set_domain_directory (const char * domain, const char * directory_name)

This function associates a translation domain name with a message catalog directory in the filesystem. Normally, you would associate your application's translation domain with the directory where you plan to install your message catalog files. Equivalent to the C function bindtextdomain().

domainDomain name.
directory_nameDirectory where the message catalogs for this domain should be found.

function Inti::i18n::set_domain_directory

const char * set_domain_directory (const string & domain, const string & directory_name)

This function associates a translation domain name with a message catalog directory in the filesystem. Normally, you would associate your application's translation domain with the directory where you plan to install your message catalog files. Equivalent to the C function bindtextdomain().

domainDomain name.
directory_nameDirectory where the message catalogs for this domain should be found.

function Inti::i18n::set_translation_domain

const char * set_translation_domain (const char * domain)

This function should be called at the beginning of an application to specify the default translation domain (message catalog). The default domain is used to find translations if the Inti::_() function is called without specifying a translation domain. Typically, you'll name your translation domain after your application. This function is equivalent to the C function textdomain().

domainNew translation domain.

function Inti::i18n::set_translation_domain

const char * set_translation_domain (const string & domain)

This function should be called at the beginning of an application to specify the default translation domain (message catalog). The default domain is used to find translations if the Inti::_() function is called without specifying a translation domain. Typically, you'll name your translation domain after your application. This function is equivalent to the C function textdomain().

domainNew translation domain.