To answer my own out of topic question and for the sake of completeness
I want to mention that an implementation I worked on today, is available
on Github[1] now. Usage examples can be found in the test[2].
[1]
https://github.com/Blazebit/blaze-utils/blob/master/blaze-common-utils/src/main/java/com/blazebit/i18n/LocaleUtils.java
[2]
https://github.com/Blazebit/blaze-utils/blob/master/blaze-common-utils/src/test/java/com/blazebit/i18n/LocaleUtilsTest.java
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
Am 12.09.2012 10:46, schrieb Christian Beikov:
This is part of the probably out of topic question, please tell me
where I could move this when it is not appropriate for the mailing list.
I just saw JEP 128[1] and wondered where I could find an
implementation of that? How are you handling this issue?
[1] http://openjdk.java.net/jeps/128
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*
Am 11.09.2012 20:25, schrieb Christian Beikov:
Hello!
I was trying to get the locale stuff right in my application and I
faced the lack of retrieving a locale based on preferences. My
question now is, whether the preferences should be handled by
LocaleResolver#getLocale or by user code that uses the locale resolver?
I have to differentiate between locales for static and dynamic texts.
Maybe also for different contexts like JSF and REST.
How should I do that in your opinion? Are there any best practices
for this issue?
Maybe a bit out of topic, but is there any "locale resolver" that
takes a set of preferences and a set of supported locales that tries
to find the "best match" and falls back to a default if nothing
found? The "best match" would IMO choose a similar language of the
set of preferences based on the supported languages like discussed in
a thread i found[1].
[1] http://forum.wordreference.com/showthread.php?t=1046357
--
Mit freundlichen Grüßen,
------------------------------------------------------------------------
*Christian Beikov*