Rss Categories

Dealing With Locales

Reference Number: AA-00615 Views: 2708 0 Rating/ Voters

The SRE Server uses locales (on both Windows and Linux) for being able to perform some internal string operations when dealing with grammars. For all purposes we use ISO-8859-1 locales for all the languages we support. See Character Encodings for more information about how LumenVox deals with different character sets.

So, if a decode or semantic interpretation fails and you see something like the below line (the whole thing is a single line) in the log file client_asr.txt (previously LVApp_SpeechPort.log or LVSpeechPortLog.txt), it means that a needed locale is not installed on the machine.

Example of a log message indicating error

IndexedRuleMap::InterpretTokens - Error loading locale"en_US.iso88591": locale::facet::_S_create_c_locale name not valid. Will use system preferred default "en_US.UTF-8".

Note that the en_US.iso88591 and en_US.UTF-8 shown in the above example may not be the same in the error you may see depending on what language is used and what the system defaults are.

When you see such a problem, it means that the required locale (en_US.iso88591 in the above example) is not available on the machine.

Starting version 10.2, the ASR server indicates any missing locales (depends on the language models installed) during startup. In addition to writing a warning message on the console (when run in console mode), warning log entries are also made inasr_server_app.txt and asr_server_restart.txt.

Example of a startup log message indicating a missing locale

CheckLocaleInfo, Locale "es_CO.iso88591" not available, grammar parses may fail for the language "ColombianSpanish"

To install the needed locales, please contact your system vendor or the administrator. General instructions are provided below for quick and dirty attempt at installing missing locales, although performing the tasks yourself is not recommended.

On Windows

Follow the steps below.

  1. Open Control Panel, select "Language and Regional Settings"
  2. Choose "Install or uninstall display languages"
  3. Click on the link "How do I get additional display languages?" at the bottom and follow the instructions on the "Windows Help & Support" window that pops up.

On RedHat/CentOS Linux

Most needed locales will already be installed with glibc-common by default. For any missing language, add it by running

$> localedef -i <lang-code> -f ISO-8859-1 <lang-code>

where <lang-code> is the universal short code for the language like en_US, fr_CA, es_CO, etc.

If that failed, you do not have the definition files for the language. The below steps are potentially dangerous and may leave your system in an unusable state. Do the following at your own risk.

  1. Determine the version of glibc-common installed by running
    $> rpm -qi glibc-common
  2. Note the version number (say X.Y.Z-AB) and get the corresponding rpm from either the installation disc or from the Centos/RedHat website. Then run
    $> export LC_ALL=C
    $> rpm -e glibc-common --nodeps
  3. Now, install the obtained glibc-common-X.Y.Z-AB.???.rpm
    $> rpm -i define "_install_langs all" <path-to-rpm>

On Debian Linux


$> apt-get install locales

$> dpkg-reconfigure locales

and follow the on-screen guide to install one or more locales.