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*

Reply via email to