When should I use resource-bundle and message-bundle tags for i18n in faces-config? The differences between those two are not very clear to me.
|
I am using Bundle Internationalization in my project. I have initialized bundle via
<f:loadBundle basename="ui.all.bundles.AppResources_en" var="msg"/>
When i need to translate some text, i am using a key to resourceBundle, to get a ... |
This is my messages_en_US.properties file in WEB-INF/classes folder :-
Login=Login
And then i created messages_fr_FR.properties :-
Login=frenchLogin
Then in my JSF page i wrote this :-
<f:loadBundle basename="messages" var="msg"/>
<h:commandButton id="btnLogin" value="#{msg.Login}" actionListener="#{IndexBean.doLogin}"/>
I can correctly see ... |
I have a legacy JSF application. Now that we want to add i18n support to the application. Some portion of the textual content comes from javascript code and is added dynamically. ... |
Goal: I want to use jsf`s i18n
Scenario:
creating resource bundle (utf-8)
file info:
file -I ./messages.properties
./messages.properties: text/plain; charset=utf-8
using it by
faces-config:
<application>
<locale-config>
...
|
I am using jsf-ri 2.0.3 where Hebrew and Russian support is needed.
The problem is that I see gibberish on the screen instead of the correct text.
First of all I have defined ... |
I have an application where the user can dynamically switch between locales from the welcome page of my application. I see that the earlier developer (inherited the code without much documentation) ... |
|
I got the following error:
> org.apache.jasper.JasperException: An
> exception occurred processing JSP page
> /ajax/busstop_ajax.jsp at line 12
10: <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
11: <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
...
|
as I asked time ago in this question, I solved my problem using this method:
- In loging.xhtm, for instance:
<f:view locale="#{languageDetails.locale}" >
<head>
.....
<f:loadBundle basename="messages.Messages" var="msg1"/>
.....
... |
How can I use ServletRequest.getLocale() in JSF application, when Servlet is absent in my code and is provided by JSF implementation? I'm trying to use ServletContextListener, but is it possible to ... |
I have a problem with i18n enums in my web application (in JSF). At the beginning i had enums with text defined inside, but now in enums i have a key ... |
I want to provide different languages in my jsf-application.
I've found that explanation and I wonder if I can also do that without faces-config (because I don't use one since ... |
I am trying to implement follwing example into my jsf2 app:
http://www.mkyong.com/jsf2/jsf-2-internationalization-example/
But I don't understand how the app knows what property-file belongs to what language.
May you pls explain :-)
|
I have a problem with following tutorial:
http://www.mkyong.com/jsf2/jsf-2-internationalization-example/
In faces-context file you have to declare the place where all the language properties-files are (<base-name>HERE</base-name>). But in that example they use apparently ... |
I implemented internationalization like in that tutorial!
When I change the language in my app. It works. But only until the next request happens. Then language settings are reset to ... |
I implemented internationalization into my jsf app as described here.
But I encountered a problem: When I change the locale all the texts on my page change. But then if ... |
Possible Duplicate:
JSF - When to use message-bundle and resource-bundle?
HI,
I have started learning the concepts of displaying the messages in different languages. I come across ... |
I am trying to localize images in JSF, and I want the user to be able to set their locale on my site. This I am doing by a call ... |
i have a resource bundle with entries like these:
entry1=value1
entry2=value2
entry3=value3
on my jsf page i am trying to use these keys dynamically, the id of the entry is coming from a managed bean. ... |
i have a selectOneMenu with selectitems.
if i use
<f:selectItem itemValue="3" itemLabel="#{hrBundle['phoneType3']}"/>
it works well, displaying the localized label. i have more options inside a List and when i use f:selectItems, it ... |
i have something like
<s:link view="/member/index.xhtml" value="My News" propagation="none"/>
<s:link view="/member/index.xhtml" value="#{msg.myText}" propagation="none"/>
where the value of myText in the messages.properties is
myText=My News
The first line of the example works fine and replaces the text to "My News", ... |
I'm wondering how internationalization works in jsf? I have read tutorial on coreservlets.com about it, but in my case it works slightly differently. In that tutorial said that ... |
I am trying to access the i18n properties file I'm using in my JSF application in code. (The idea is to have a page that displays its keys and values as ... |
I'm trying to implement loading Resource Bundles for JSF application from DB, following the sample: Design question regarding Java EE entity with multiple language support
For the test I coded getItSomehow() ... |
Hi All Please could someone give me some advice on internationalization best practice for JSF. I know what I am trying to achieve but not the best method. I would appreciate any guidance. Requirements ============ I want a ResourceBundle accessible to my JSF pages, backing beans and model objects loaded from a properties file. I dont want to load the ResourceBundle ... |
|
|
|
|
|
|
|
|
|
|
Hi, I have this tag where the user can change the language. Here is the method of the managed bean : public void changerLangueComboBox(ValueChangeEvent event) { FacesContext context = FacesContext.getCurrentInstance(); if ("en".equals((String) event.getNewValue())){ context.getViewRoot().setLocale(Locale.UK); this.locale = Locale.UK; } else if ("fr".equals((String) event.getNewValue())) { context.getViewRoot().setLocale(Locale.FRENCH); this.locale ... |
|
|
|
I have a web app built by JSF2, with English and French versions of pages. I created a wrapper.xhtml as the template page, defined header, content, and footer pages Then I created a helper page that uses this wrapper as the template. 'msgs.glossaryLink' contains the links ... |
|
Hi I am new to JSF . I want to perform the concept of internationalization with jsf1.2 and i m using glassfish as server . I Don't want the code to have a menu from which we select a particular language . I NEED it to be browser specific i.e if i change the language of the browser then it should ... |
|