Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::i18n Namespace Reference

Internationalization and Localization. More...

## Functions

- const char * set_text_domain (const char *domain)
    Change or query the current status of the current global domain of the LC_MESSAGE category.
- const char * set_text_domain_dir (const char *domain, const char *dir)
    Binds the given domain to a file in the specified directory dir (see gettext documentation to find out this file is determined).

## Detailed Description

Internationalization and Localization.

Provides a C++ interface to GNU gettext for Internationalization and Localization support.

## Function Documentation

const char* set_text_domain | ( | const char * | domain | ) |

Change or query the current status of the current global domain of the LC_MESSAGE category.

Parameters:

  domain | The name of translation domain (must be legal filename characters).

Returns:
  A domain name (see explanation below).

If the domain is null, the function returns the current value. If no value has been set before, the name of the default domain is returned: messages. It is important to note that no checks of the availability are made. If the name is not available no translations will be provided. The return string must not be freed.

const char* set_text_domain_dir | ( | const char * | domain,
|  | const char * | dir
| ) |

Binds the given domain to a file in the specified directory dir (see gettext documentation to find out this file is determined).

Parameters:

  domain | The translation domain.
  dir | The directory name.

Returns:
  A directory name (see expalantion below).

If domain is null nothing happens and a null pointer is returned. If dir is null the directory associated with domain is returned. It is important to remember that relative path names for dir can be trouble. Since the path is always computed relative to the current directory different results will occur when the program executes a chdir command. Relative paths should always be avoided to avoid dependencies and unreliabilities. The return string must not be freed.

Main Page - Footer