GeoExt

Table Of Contents

GeoExt.Lang

Extends
class GeoExt.Lang
The GeoExt.Lang singleton is created when the library is loaded. Include all relevant language files after this file in your build.

Public Properties

Public properties in addition to those listed for Ext.util.Observable.

Lang.locale
String The current language tag. Use set() to set the locale. Defaults to the browser language where available.

Public Methods

Public methods in addition to those listed for Ext.util.Observable.

Lang.add()
Parameters:
  • localeString A language tag that follows the “en-CA” convention (http://www.ietf.org/rfc/rfc3066.txt).
  • lookupObject An object with properties that are dot delimited names of objects with localizable strings (e.g. “GeoExt.VectorLegend.prototype”). The values for these properties are objects that will be used to extend the target objects with localized strings (e.g. {untitledPrefix: “Untitiled “})

Add translation strings to the dictionary. This method can be called multiple times with the same language tag (locale argument) to extend a single dictionary.

Lang.set()
Parameter:locale – ‘’String’’ Language identifier tag following recommendations at http://www.ietf.org/rfc/rfc3066.txt.

Set the language for all GeoExt components. This will use any localized strings in the dictionary (set with the add() method) that correspond to the complete matching language tag or any “higher order” tag (e.g. setting “en-CA” will use strings from the “en” dictionary if matching strings are not found in the “en-CA” dictionary).

Events

Events in addition to those listed for Ext.util.Observable.

localize
Fires when localized strings are set. Listeners will receive a single locale event with the language tag.