The resource-bundle is configured as-
<resource-bundle>
<base-name>views.msgs.labels</base-name>
<var>msg</var>
</resource-bundle>
in faces-config.xml
.
with 2 properties files in resources/views/msgs/
-
labels_en.properties
labels_fr.properties
There are 2 sections:
In the above section, the text/ labels need to be shown in English
, whereas the lower half, the text has to appear in French
.
To put it simple,
<f:view locale="en" >
#{msg['hello']}
#{msg['name']}
</f:view>
<f:view locale="fr" >
#{msg['HELLO']}
#{msg['name']}
</f:view>
The two keys hello
& name
appears in both property files.
I see that locale="fr"
in the lower half f:view
overrides the above one.
And the whole output appears in French
.
How can I fix this?