Table Of Contents


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.

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.

  • localeString A language tag that follows the “en-CA” convention (
  • 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.

Parameter:locale – ‘’String’’ Language identifier tag following recommendations at

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 in addition to those listed for Ext.util.Observable.

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