dev@javaserverfaces.java.net

Composite component localization issue

From: Michael Kurz <michi.kurz_at_gmx.at>
Date: Tue, 10 Aug 2010 19:32:39 +0200

I ran into an issue playing around with localization of composite
components. I initially tried to add a localized resource bundle for a
cc that is referenced via resourceBundleMap. So I made the following
file structure:

/resources/mylib/component.xhtml
/resources/de/mylib/component.properties
/resources/en/mylib/component.properties

Unfortunately, this only works with MyFaces but not with Mojarra. If I
have the locale prefix set Mojarra tries to get all resources out of the
"localized directory". Doing some investigations I found out that
Mojarra behaves correct regarding the spec but I don't like the idea of
duplicating the whole library just because I need one file localized.

I was not the first to notice this: [1]. According to this spec issue,
this will be fixed in JSF 2.1. Any chance that there will be an earlier
solution? Because the simplest way to avoid this is to simply skip the
locale prefix if no resource can be located with the prefix (that's what
MyFaces does). If there are any chances I can file the according issue.

Best regards
Michael

[1]:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=54814