[slf4j-user] Cal10n ignores default bundle

Johannes Dorn johannes.dorn at codetrails.com
Tue Jan 8 17:26:30 CET 2013


Hi,

please help me with this as i am sure, i misunderstand something.
Similiar topics on the cal10n mailing list have not been answered which is why i am posting here.

We use cal10n to localize logging messages and would like to have a structure where there the following bundles:

messages.properties
messages_de.properties
messages_fr.properties
...

What we expect is for cal10n to select messages_de.properties for german locales, messages_fr.properties for french locales and the default bundle messages.properties (which contains the messages in english) for all other locales.

This works fine as long as the user has a german or french system but fails on all other locales. 

MessageConveyorException: Failed to locate resource bundle [org.example.foo] for locale [en_UK] for enum type [org.example.Messages]

The default bundle is never chosen. Isn't there a fallback mechanism or a way to define a default resource bundle that will be chosen when no supported one is found.

We probably misunderstand something here, because otherwise the use of cal10n would result in programs to only work on supported locales, requiring lots of localization files.

How can we get cal10n to fall back to a default locale?

Thanks,
Johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20130108/04d45108/attachment.html>


More information about the slf4j-user mailing list