camptocamp/cgxp — Issue #18: Inconsistent i18n systems
Author: asaunier
Created: 2012-01-13 10:25:46+00:00
State: open

In CGXP we mainly use the OpenLayers.i18n() system whereas GXP uses GeoExt.Lang. Both systems are quite different:
- OpenLayers.i18n() is a simple key-value replacement system: strings are translated "on the fly" when used.
- GeoExt.Lang updates the i18n strings, directly in the properties of the GXP classes

Should we consider using GeoExt.Lang in CGXP as well, in order to keep the consistency between GXP and CGXP?

In addition this inconsistency may create problems. For instance with
https://github.com/camptocamp/cgxp/blob/master/core/src/script/CGXP/plugins/Measure.js
=> this plugin is inspired from a GXP plugin (using GeoExt.Lang) and does not use OpenLayers.i18n(). That would not be relevent since the interface strings are unchanged. However for now translations for this plugin are broken because GeoExt.Lang has no translation for it.
Should we change the plugin so that it extends the original one, and removing the interface string properties?