Esmith::I18N

From SME Server

NAME

esmith::I18N - Internationalization utilities Mitel Network SME Server
In a root terminal you can do the command below if you want to display the up-to-date content

perldoc esmith::I18N

VERSION

This file documents "esmith::I18N" version 1.4.0

SYNOPSIS

          use esmith::I18N;

          my $i18n = new esmith::I18N;

DESCRIPTION

This module provides general internationalization and localisation utilities for developers of the Mitel Networks SME Server.

GENERAL UTILITIES

availableLocales()

Returns an array containing the available locales supported by the server.

fallbackLocale()

Return system fallback locale

preferredLocale()

Retrieves the preferred locale for this server.

setLocale()

Configure the locale for gettext() for the supplied text domain.

The method takes two arguments, the text domain, and an optional argument which can be either a language tag or a locale.

langtag2locale

Even though the directories appear in /usr/share/locale, they also need to appear in /usr/lib/locale to actually be treated as locales. Read the Perl locale docs for details of how horrid this is. For now, we’re just going to force things for supported languages.

fallbackLanguage()

Return system fallback language

preferredLanguage()

Returns the preferred language, determined by the HTTP_ACCEPT_LANGUAGE setting from the browser and the available languages on the server.