Confluence Docs 2.10 : I18N Architecture
This page last changed on Dec 02, 2008 by smaddox.
This document sheds some light on how Confluence looks up a message text from one of the resource bundles. Loading of ResourcesCurrently the only implementation of the I18NBean interface is the DefaultI18NBean. When it is instantiated, it attempts to load resources from the following locations:
Resource Bundle StructureDefaultI18NBean internally creates a list of CombinedResourceBundles per locale, combining resource bundles from language packs and i18n resources of the same locale. When you call one of the DefaultI18NBean.getText() methods it will go through the bundles in the following order:
On a lookup of a combined resource bundle, the last occurrence of a given key takes precedence during the lookup, which results in the following lookup order:
The order within i18n resources and language packs with the same locale is not defined, as they are loaded from the plugins which are loaded in an arbitrary order. This is not an issue in most cases, as you usually have no overlapping keys between your resources anyway. ExampleGiven the following situation:
The resource bundle structure would look like this: RELATED TOPICS![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Dec 03, 2008 15:13 |