Type: New Feature
Status: In Progress
Affects Version/s: None
Fix Version/s: Backlog
We can do better schema localization.
The curent scheme uses a LocalizingDynamicSchemaProcessor and therefore each localized copy is a different schema. Cache is not shared between schemas. Nor can you easily switch from one locale to the other.
In the new scheme, localized resources would be built into the schema and known to Mondrian. You would set the locale using a Locale connect string property, and you can call OlapConnection.setLocale(Locale) to change the locale of the connection after creation.
The olap4j driver methods that surface localizable data would use the correct version for the current locale. These are:
(MetadataElement is implemented by Catalog, Cube, Database, Dimension, Hierarchy, Level, Member (including Measure), NamedSet, Property, Schema.)
Note that name, unique name and so forth are never localized. They are the same for all locales. Otherwise MDX queries would break when you switch locales.
Members that come from tables (i.e. most members other than measures and calculated members) are localized using a different mechanism, described in MONDRIAN-1352. (That feature can be done before or after this feature; both features require a new Schema.locales attribute.)
You can define a localized caption or description in the schema using an annotation element. For example,
Any locale for which the property is not localized will fall back to the default locale.