i18n.eh

Internationalization support More...

use "i18n.eh"

Types

type TextDomain < Any;

Functions

def _(msg: String): String;
def loadtextdomain(domain: String): TextDomain;
def setlocale(lc: String);
def settextdomain(domain: String);
def TextDomain._(msg: String): String;

Description

This header provides support for multilingual applications.

Type details

type TextDomain < Any;
catalog of translated messages

Function details

def setlocale(lc: String);
Sets locale to be used in this program. Do not forget to reload message catalogs after changing locale.

def settextdomain(domain: String);
Sets the default text domain for this application. This function attempts to load

def _(msg: String): String;
Returns translated string from the default message catalog. If message catalog is not set or does not contain translation then the original string is returned.

def loadtextdomain(domain: String): TextDomain;
Loads and returns message catalog for current locale. This function always returns non-null value. If the message catalog does not exist or can not be loaded then empty catalog is returned.

def TextDomain._(msg: String): String;
Returns translated string from the message catalog. If message catalog is not set or does not contain translation then the original string is returned.