Troubleshooting

Here are a few quick solutions you can use when troubleshooting your locale.

Issue:

Some text is not being translated.

Possible causes:

  1. The untranslated text has yet to be localized.
    • For example, the source code in question is akin to print 'Hello World'; instead of print $locale->maketext('Hello World');
  2. It is not in the base locale's lexicon.
  3. It is in the base locale's lexicon but it has not been translated into the current locale's lexicon yet.
  4. It is mistyped and therefore is not in the lexicons.
    • print $locale->maketext('Hello Wordl'); when the string is actually 'Hello World'.
  5. It is not meant to be, or cannot be, translated. This is the case for some low-level system messages.


Issue:

/path/to/file.html :: Could not find key via 'X' locale:
    'Hello World'
    Cpanel::Locale::X : /var/cpanel/locale/...

Possible cause:

The example above expresses that the Hello World key cannot be found in the locale's lexicon or the base locale's lexicon. If you encounter this issue, ensure that the locale's lexicon and base locale's lexicon have been compiled. To view more information about compiling the locale's lexicons, issue the following command as root:

/usr/local/cpanel/bin/build_locale_databases --help


Issue:

/path/to/file.html :: Could not find key via 'X' locale:
 ''
 Cpanel::Locale::X : /var/cpanel/locale/...

The example above expresses that the following is happening:

$locale->maketext(' ');

Possible cause:

This is likely caused by a syntax error. For example:

  • [% locale.maketext($lang_key) %] is incorrect.
  • [% local.maketext(lang_key) %] is correct.


Issue:

Some localized date or time names do not start with an uppercase letter.

Cause:

This is not a bug. The date/time localization names and patterns are defined by and taken directly from the Unicode Common Locale Data Repository (CLDR).


Issue:

Text is garbled.

Cause:

The data is encoded in a character set other than the one it claims to be. Click here to learn how to fix this issue.


Issue:

Locale and territory names are garbled in a menu or Your current language is display.

Cause:

This data comes from the Unicode Common Locale Data Repository (CLDR). Click here to learn more.

Topic revision: r6 - 05 Nov 2009 - 14:36:01 - Main.MelanieSeibert
CpanelLocale.LocaleTroubleshooting moved from Sandbox.LocaleTroubleshooting on 01 Oct 2009 - 19:39 by Main.JustinSchaefer - put it back
 

Copyright © cPanel 2000–2011.