org.hd.d.pg2k.svrCore
Class I18NTools

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.I18NTools

public final class I18NTools
extends java.lang.Object

Holds constants and some utility methods for internationalisation (i18n). These are features common to the core system, Web presentation, etc.


Field Summary
static java.lang.String BUNDLE_COMMON
          Name of common resource bundle for core i18n messages.
static java.lang.String BUNDLE_TREEDESC
          Name of tree-description i18n resource bundle.
static java.util.Locale DEFAULT_SYSTEM_LOCALE
          Default locale to use in the system and on the Web site; not null.
static java.util.Map<GeoUtils.CCTLD,java.util.Locale> LOCALE_BY_CCTLD
          Immutable map from (a small set of common) top-level ccTLDs to best overall locale in our supported set for that location.
static java.util.Set<java.util.Locale> LOCALES
          Immutable Set of most locales supported by the system.
static java.util.List<java.util.Locale> MAIN_LOCALES
          Main locales that we support i18n for in an immutable List.
 
Constructor Summary
I18NTools()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUNDLE_COMMON

public static final java.lang.String BUNDLE_COMMON
Name of common resource bundle for core i18n messages.

See Also:
Constant Field Values

BUNDLE_TREEDESC

public static final java.lang.String BUNDLE_TREEDESC
Name of tree-description i18n resource bundle.

See Also:
Constant Field Values

DEFAULT_SYSTEM_LOCALE

public static final java.util.Locale DEFAULT_SYSTEM_LOCALE
Default locale to use in the system and on the Web site; not null. This is British English, and reflects what we expect to find in the base messages (files) that the Web sites will use.

This locale is one that we should always be able to support.


MAIN_LOCALES

public static final java.util.List<java.util.Locale> MAIN_LOCALES
Main locales that we support i18n for in an immutable List. Earlier items are preferred (eg more commonly used by visitors); the site default is the first value.

Every item in this list is a Locale whose String version is of the form ll or ll_CC where "ll" is the language and "CC" the optional country code, eg fr for French and en_GB for UK English.

Every item that appears in this list has at least:

There may be partial support for languages/locales other than those listed here.


LOCALE_BY_CCTLD

public static final java.util.Map<GeoUtils.CCTLD,java.util.Locale> LOCALE_BY_CCTLD
Immutable map from (a small set of common) top-level ccTLDs to best overall locale in our supported set for that location. This is not comprehensive (though we try to cover common cases where we have any explicit support), and is mainly to help when a browser (or search engine) does not indicate a preferred locale explicitly.


LOCALES

public static final java.util.Set<java.util.Locale> LOCALES
Immutable Set of most locales supported by the system. Designed for relatively fast lookup.

Constructor Detail

I18NTools

public I18NTools()

DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.