-
Internationalization in JSF 2.0 facelets
I am just newbie for the JSF environment (I have been creating only Struts2 application for a long time). I think that if there is a new and applicable also suggested method of i18n'ing JSP 2.0 facelets or entire docs that I find about 1.2 are still valid. There may be JSF 2.0 comes up with some latest and easier method for displaying internationalized resources in facelets. Thanks for any information..
-
Re: Internationalization in JSF 2.0 facelets
I18n is not actually Facelets dependent .This is just a view technology. It is JSF specific and seems as independent of the view technology (so this would be handled in the same method on JSP). So head to JSF. If you are really trying to search out then you can go for the JSF 2.0 guidelines in the new Java EE 6 tutorial. I have opened a bit via this but I am unable to find the i18n / l10n chapters while they were stored within the Java EE 5 tutorial as the ending chapter of part II.
I think that the JEE6 tutorial is still in initial stage and that it is yet to be associated. Regardless, you can also search about more details in chapter 2.5.2 of the JSF 2.0 guidelines . This is however not tagged as a tutorial..
-
Re: Internationalization in JSF 2.0 facelets
I am so glad that you viewed my question and thanks for that. I found the procedure to fix my problem. I put it here as maybe can help somebody also latest with the JEE6:
I just had to tag the specific lines suggested as follows :
<resource-bundle>
<base-name>com.cervatoh2.package</base-name>
<var>msgs</var>
</resource-bundle>
in faces-config.xml
After that, I can refer to resources directly as:
#{msgs.helloWorld} to get the translated "Hola mundo".
Now, it considered as easy but I didn't look at faces-config as in JEE6 which is treated as an optional file.
-
Re: Internationalization in JSF 2.0 facelets
Have you searched about this f:loadBundle? It seems as you are able to load a bundle per page and possibly commonly in a base template page.Load a resource bundle localized for the Locale of the recent view, and explain the visibility of this as a java.util.Map in the required components of the recent request made within the key dedicated by the value of the "var" attribute of this one tag. The Map must show such that if a get() call is interpreted for a key which does not exist within the Map, the literal string ???KEY??? is reflected from the Map..
-
Re: Internationalization in JSF 2.0 facelets
Hi all,
I am also running with the same confusions and I got this thread and thought that I can solve my issues here and I moved through both methodologies :
- the one suggested by shimani
- Implementing f:loadBundle tag (in facelet template) without faces-config.xml
Which one is would be good in a sense of:
- performance
- simplicity in management, just as configuring the webapp message bundle states by clicking the button..
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Page generated in 1,751,888,686.25887 seconds with 15 queries
Bookmarks