On 20.08.2012, at 14:51, Felix Meschberger <[email protected]> wrote:
> Elaborating on your extension problem: It looks like currently only a single > ResourceBundleProvider is used for all resources and locales. > > How about an extension: > > * Multiple providers are supported > * Each provider may indicate the supported locales I thought about the same, but discarded the idea, as I felt it is overkill. Especially indicating the supported locales might become more complex if a provider supports a wildcard set. Or the JCR one would have to look up the list of locales from the repository first. > When resolving a resource bundle for a certain locale, the I18nFilter calls > all registered ResourceBundleProvider services matching the request locale > for a resource bundle. The first service supplying a resource bundle wins. > Services are called in service rank order. > > Alternatively all ResourceBundleProviders matching the request locale are > called and a combined ResourceBundle of all non-null results are used. > You could then register your test ResourceBundleProvider for the zz_zz locale > with a higher service rank as the JcrResourceBundleProvider. Sounds good, but too much complexity IMHO. My solution has the benefit that it does not require any change to sling i18n at all. Do you think my approach would work (especially 4)? Cheers, Alex
