JSF Internationalization in arabic

Hi,
i have to display JSF page in Arabic language
I have stored properties file in arabic using UTF-8 character encoding
and save properties file for eg messages_ar.properties
But Jsf page is displaying garbage charaters in place of arabic value
My JSF page contains:
<%@ page contentType="text/html; charset=UTF-8" %>
meta tag
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
and even set encoding on html as UTF-8
but still no effect
Please help me out its urgent
Thanks
akashikha

Hi,
Try this...
when viewing in a browser, you could try setting the encoding (on the view menu normally) to arabic (ISO-8859-6).
But I am not sure have you done it or not?
Edited by: Sat@301177 on Feb 20, 2008 4:51 AM

Similar Messages

  • Internationalization in OIPM

    How does one configure internationalization such Arabic, Japanese etc for OIPM.
    Hence the labels should reflect the language for which we have configured.
    The default langauge is currently English besides there is nothing mentioned in the documentation.
    Any pointers would be useful

    SystemProperties, which is the application to set the requested, runs as a Java standalone application.
    In order to change the language of your system, you need to:
    a) enable the language in SystemProperties, tab Localization - if you want to have the enabled language as the default, you can set it in the tab Server
    b) restart the appropriate server
    c) set the language for a user in his or her profile, if a different, but default language should be used
    SystemProperties are always bound to the appropriate instance. I think you ran the SystemProperties of your UCM instance (that's why you saw changes in UCM). First, you need ti identify SystemProperties of IPM instance. Check this link: http://docs.oracle.com/cd/E21764_01/doc.1111/e10792/c02_processes.htm#CSMSP113
    (search for the location of Admin Apps is slightly different for each OS)

  • [JSF 1.2 and 2.0/Internationalization] How to propagate the Locale to the entire application

    Hi,
    do you know how to internationalize an application in a dynamic way in JSF 1.2 ?
    I created 2 files msg_fr.properties ( language by default, french) and msg_en.properties ( english)
    Then I wrote a methode changeLanguage() in a Managed Bean . This method allows me to switcher the language in the first page of the application.
    This method is called in a tag <h:commandLink>
    public void changeLanguage() { 
            FacesContext context = FacesContext.getCurrentInstance(); 
            // I test a parameter (currentLanguage) and I switch in consequence 
           context.getViewRoot().setLocale(Locale.ENGLISH); 
           //or    context.getViewRoot().setLocale(Locale.FRENCH); 
           context.getApplication().setDefaultLocale(context.getViewRoot().getLocale()); I have of course modified the file faces-config.xml.
    This WORKS but for the current page only. The Locale is not propagated to the next pages of the application.
    The Locale by default of my browser is English and so the next pages are always in English, even if i switch the first page to French.
    Do you know how to propagate this Locale to all the pages of the application in JSF 1.2 ?
    Also, has internationalization been improved in JSF 2.0 ?
    thanks

    The f:view has a 'locale' attribute. You should make use of it. Feed it with a property of a session scoped bean which you could control/change using for example some language dropdown menu or a request parameter or pathinfo. There is no need to traverse the FacesContext and UIViewRoot yourself.
    For more about i18n in JSF, please consult the Sun JSF specification and the Sun Java EE tutorial.

  • CSS layout and Internationalization of JSF apps

    We use message bundles to handle internationalization in our JSF applications. This approach seems to work as we used HTML tables (or rather <h:panelGrid> tags) to layout components on the page.
    We had numerous customer complaints about tons of extra white space left on the screen in languages like German (where some words are very long). There are other issues with grid layouts, and we decided to give CSS positioning a try.
    I wonder, what folks on this forum think about using CSSP in conjunciton with JSF components. Also, given that text strings have different length in different languages, what is the i18n approach? Afterall, coordinates that work in English may not be accurate in German.
    Any suggestions, ideas, pointers would be greatly appreciated.
    Thanks,
    Vadim.

    Hi guys.
    The problem seems a little bit weird. But you could try the following. It is just the idea.
    1. You should recover the .properties file and get the Map for the current Locale. This should have to be done maybe in the Backing bean.
    2. Get the maximum length of the UIOutputText elements present in the form that you need to control its length. Now the important thing here is that you should have the value atribute of the UIOutputText objects based on an internationalized Base Bundle prefix. Just cut -based on the substring of the value attribute- the name of the property.
    3. Consider that you have to look in the Map the entry you just obtained from the UIOutputText object. After get the value of that Map entry (a String object) and get its length. At the end of the loop you sould have get the maximum length in characters of the component values to be displayed.
    4. Fix that value as an attribute in the backing bean.
    5. Use the output of that value to generate the style in CSS, as an String attribute of the Backing Bean. Base your CSS construction in "em" measures
    6. Change the -style- attribute in each component to reflect the correct length using CSS like this -style="#�{backingBeanName.style}"-. With this you will get an space dependent of the length of the localized values.
    Again. It is just a suggestion, I had not tried it already but I guess that will be my way in that case.
    Greets from Ecuador

  • Internationalization in JSF

    [http://jsflessons.blogspot.com/p/internationalization.html]

    Good article ..
    I have to give internationalization support for an exsisting JSF application. I don't want to go and update the view tag in all my jsp pages.
    Is there any other way to do this by modifying a single class in my project, other than the two options given in the article?

  • How to use Hindi as internationalization in JSF

    could you pls help in this topic

    Just the same way as you do in JSP. Since JSF 1.2 you can use unified EL #{ } in c:forEach.
    You can also use Tomahawk's [t:dataList|http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_dataList.html] by the way. It is more efficient.

  • How to internationalize images, css, js in JSF?

    Hi All,
    Just came to my mind and haven't think of it thoroughly but any better ideas how to internationalize the images, css, or js?
    For example:
    1. when the user's Locale is en, it will loads logo_en.jpg
    2. when the user's Locale is ja, it will loads logo_ja.jpg
    First came to my mind is to use the resource bundle (using its key=value pair).
    Much thanks,
    Eson.

    InDesign works on a different model. It might be best to adjust your thinking away from "float/clear."
    In page layout, it is "Text Wrap." You apply text wrap to your image, and any text that would otherwise occupy the same space will flow around the image instead. In the Text Wrap panel, you can adjust offsets, (or perhaps it would be more accurate to think of them as 'stand-offs'  or 'padding'), to push the text away or draw it closer.

  • Arabic + Internationalization

    Hi,
    I am doing project for SA. That requires Arabic language to be included in JSP. what are steps required to so?
    I am putting arabic content in properties file. and trying to read to content using ResouerceBundle class. But I am getting the following error.
    java.util.MissingResourceException
    Please Suggest me the exact steps to solve the problem.
    From,
    Nirav_Pradhan

    java.util.MissingResourceExceptionA typo in your source code?
    Or, is it really missing?

  • Internationalization with JSF

    Hi Everyone,
    Here is what happens in my App:
    When index.jsp is hit, I determine wether its an authorized/unauthorized login. Based on that user is either forwarded to search/error jsp's. Now I have to add Multi Lingual support to the app. Basically the aplication will be invoked from a portal like app so the URL will look like this :
    http://xyz.corp.xyz.com:7780/appsell_uat_xyz/faces/index.jsp?&languageCd=ENG&userId=MPENIKELAPATI
    Now I am supposed the pick up the language from the above URL and set the locale accordingly.
    I want to set the locale while I am on index.jsp only determing access authority. The way I tried to do this is (I have a bean asociated with index.jsp, this code goes in that bean) :
    if(languageCd == "JA"){
    context.getViewRoot().setLocale(Locale.JAPANESE);
    Faces config:
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/search.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/index.jsp</from-view-id>
    <navigation-case>
    <from-outcome>error</from-outcome>
    <to-view-id>/error.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
      <application>
        <locale-config>
          <default-locale>en</default-locale>
          <supported-locale>ja</supported-locale>
        </locale-config>
      </application>Problem here is if I try to set the local in index.jsp only, viewRoot is not search.jsp yet. So the labels are of default locale. I also tried to set the local in the constructor of search.jsp. This works, but is a very unclean solution as on all the hits code will be executed. One additional problem with this approach is when control is redirecting from index to search jsp, I see all the labels in English for a very small time then the labeles change to Japanease.
    I think I dont understand Localization approach of JSF at all. I read local will be picked up from browser setting, but I dont know how will that behave.
    I will appreciate a great deal if someone can clear my concepts here!
    Thanks in advance!

    Yes, by default JSF will use the locale from the client, determined from the Accept-Language header. If this is not suitable to your application, I recommend using a servlet filter to set the locale according to your scheme by wrapping the request object and overriding ServeltRequest.getLocale(). You could determine the locale once from URL and then store it in the session or a cookie, whichever suits your needs.

  • How to insert arabic&english  from oracle clients like TOAD,SQL*PLUS

    Hi
    iam trying to insert arabic&english data from TOAD&SQLPLUS.
    if i try to insert arabic by copy and paste iam getting ???? and
    if i try to insert through my keyboard (after updating my system with regional
    settings) iam able to type some junk characters.
    I have installed Oracle 8.1.6 with characterset set to UTF8 and
    in my client NLS_LANG settings i have tried with different settings like:-
    AMERICAN_AMERICA.UTF8
    AMERICAN_AMERICA.AR8MSAWIN
    ARABIC_UNITED ARAB EMIRATES.UTF8
    ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
    i have also updated INIT.ORA nls_language ='ARABIC'.
    but still iam getting same problem.
    any help in this appriciated.
    Thanks
    Srinivas

    Are you able to use Arabic with your Java VM in general? Or are you having problems specific to your database interactions? Sun provides an internationalized version of the JDK and also an "English only" version. Perhaps you have the English only version? I would recommend trying a simple Hello World app with your JVM first... I would also check your JDBC driver documentation and make sure there are no limitations there, and that your database is also setup for internationalization.
    It is certainly possible to use TopLink in internationalized environments as we have lots of customers doing this, so hopefully we can figure out what is wrong with your setup.
    - Don

  • JSF webapp works with Java 1.4, but not Java EE 5

    Hello
    I am having a really weird problem with internationalizing my JavaServer Faces web application.
    I am using Netbeans 6.0, Tomcat 6.0.10, JSF 1.2, and JTSL 1.1....
    If I use Java 1.4 to run the webapp, everything works fine!
    If I use Java EE 5 then it fails to execute internationalization of my choosen locale.
    I could just use Java 1.4 and have my site working fine, but I would really like to use Java EE 5 since it can do more. Also I don't see why it can work on one version of Java but not another. My locales are English (en) and Korean (ko).
    This is my index.jsp
    <%--
        Document   : index
        Created on : 2/05/2008, 01:33:01
        Author     : Steve
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <html>
        <f:view locale="#{localeBean.language}">
            <f:loadBundle basename="resources.messages" var="msg"/>
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <title>JSP Page</title>
            </head>
            <body>
                <h2>Hello <h:outputText value="#{localeBean.country}"/>!</h2>
                <br>
                <h4><h:outputText value="#{msg.language}"/>:</h4>
                <h:form id="languageForm">
                    <h:selectOneMenu   onchange="this.form.submit();" valueChangeListener="#{localeBean.dropdown1_processValueChange}">
                        <f:selectItem itemLabel="English" itemValue="en"/>
                        <f:selectItem itemLabel="������" itemValue="ko"/>
                    </h:selectOneMenu>
                </h:form>
                <h:outputText value="#{localeBean.language}"/>
            </body>
        </f:view>
    </html>This is my localeBean which is under the package "resources"
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package resources;
    * @author Steve
    import java.util.Locale;
    import javax.faces.event.ValueChangeEvent;
    public class localeBean {
        private String language = Locale.getDefault().getLanguage();
        private String country = Locale.getDefault().getCountry();
        public String getLanguage() {
            return language;
        public void setLanguage(String newValue) {
            language = newValue;
        public String getCountry() {
            return country;
        public void setCountry(String newValue) {
            country = newValue;
        public void dropdown1_processValueChange(ValueChangeEvent vce) {
            setLanguage((String) vce.getNewValue());
    }This is my faces-config file
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <application> 
            <locale-config>  
                <default-locale>en</default-locale>  
                <supported-locale>en</supported-locale>
                <supported-locale>ko</supported-locale>
            </locale-config>
            <message-bundle> resources.messages </message-bundle>
        </application>
        <managed-bean>
            <managed-bean-name>localeBean</managed-bean-name>
            <managed-bean-class>resources.localeBean</managed-bean-class>
            <managed-bean-scope>session</managed-bean-scope>
        </managed-bean>
    </faces-config>and lastly I have my message bundle under the "resources" package which is named "messages".
    This has a key word "language" which is "Language" in the 'en' locale file and "����" in the 'ko' locale file.
    Once again when using Java 1.4 this project runs fine, however with Java EE 5 it does not.
    You may notice in my index.jsp that I have <h:outputText value="#{localeBean.language}"/>
    I use this to display the locale that has been chosen by my select box. Even when this shows a different language has been chosen the page does still not display in the correct language. According to <f:view locale="#{localeBean.language}"> then the locale of the page should be changed.
    I have looked over the web quite far for an answer to this problem. But everyone else seems to be using a similar method of loading up a message bundle and using it the same way I am. However my method does not work.
    Any suggestions or clues to what is going wrong would be really appreciated.
    Thanks in advance^^

    it seems that the
    <f:view locale="en">
    only work if a ressource bundle with the locale sufix '_en' is provided.
    Everything works now if I provide 3 ressouce files:
    global_en.properties
    global_de.properties
    global.properties
    global.properties and global_en.properties are identically!
    But if I delete the global_en.properties file always the global_de.properties file wins before the default properties.
    I did not expect such a behavior :-(

  • Why isn't my jsf app internationalizing?

    Hello all -
    Using NB 6.5.1, JDK 6, Java EE 5, and Glassfish V3, so nothing but the good stuff. This should be simple for anyone who is already internationalizing their apps, so please assist.
    New to i18n but badly needing to grasp it, I have developed the following mini project that should change its displayed language but only based on user choice, and not the browser's settings.
    1) created a jsf web app project (called langs) with Visual Web Java Serverfaces support
    2) dragged & dropped (d&d) a dropdown list object and configured it with two items: en and fr for English and French. Also, made it "Auto-submit on change" and provided it this event handler:
       public void dropDown1_processValueChange(ValueChangeEvent event) {
          FacesContext context = FacesContext.getCurrentInstance();
          UIViewRoot viewRoot = context.getViewRoot();
          String loc = dropDown1.getSelected().toString();
          viewRoot.setLocale(new Locale(loc));
          info("Locale: " + viewRoot.getLocale().toString());
       }3) d&d a loadBundle object into the jsf page, so the jsp version of the page now has this tag:
    <f:loadBundle basename="langs.Bundle" var="msg1"/>4) added one locale, this is the "fr_FR - French / France" as shown in the "New Locale" dialog
    5) into the Bundle.properties file, I added one key: "welcome", with default language: "hello", and fr_FR - French language: "au revoir"
    6) d&d a label object onto the page, and set its text as follows: #{msg1.welcome}. As soon as I do that, the text is shown rendered on the development page to "hello", so I am accessing the file OK.
    7) ... and that's it. I run the program, all I ever see is the word "hello". I change the selection from the drop down list of course and the page refreshes, but all I see is "hello". I check print out the value of the viewRoot's locale and it shown me either "en" or "fr" in accordance with my selection, but the displayed string is "hello".
    I have been stuck with this for (well, I am shy to say) sometime now and I really need to solve it. What am I "not" doing? I must be missing something that makes the app oblivious to the file named Bundle_fr_FR.properties (the other one of course is Bundle.properties).
    And while we are it, can I pick and choose my bundle files dynamically from within the application to force the app to get the values for the keys from a certain file? For example, suppose I want to internationalize and app into 7 languages (some LTR, others RTL) and I don't want to put all the values for the keys in one "basename" file, could I do that?
    Your answer and pointers are much, much appreciated. Thank you.
    Mohsen

    Why not get sun's J2EE tutorial and follow the steps explained there.
    Even if you insist on using Netbeans' drag and drop facilities, you could still view the source to make sure that it matches what's explained in the tutorial. I find that doing some things manually first helps me understand and appreciate the processes better when I later use a tool to speed up development.

  • My Faces can not output unescaped arabic chars?

    Hi All,
    We recently switched from the Reference Impl of JSF to the MyFaces impl and are disappointed to learn that it the response writer escapes all arabic characters when outputting in UTF-8, with no option of writing out unescaped arabic. We are using a struts like validation component to generate client side validation and by escaping the arabic characters our validation output is failing to work since the move from the ref impl.
    The problem is that the response writer impl for faces is calling "encode" on the string. Is there any way to get a response writer not to encode it? Can I plug in a custom respone writer to use just for our validation component?
    Also, using the servlet output stream (using the external context) seems to render the validation stuff in the wrong place so it is no good using that method of writing out the validation.
    Any ideas/ solutions/ simular experiences?
    Regards
    Colm

    Ok, I have noticed that the write(int) method of the getResponseWriter implemetation does not call the "encode" method, but this is probaly going to be slow using this method to write a big javascript include!
    Any other ways of doing this?

  • Error after arabic language installation

    hi
    i installed EBS on redhat linux EL4 machines
    the configuration is :
    two nodes:
    node1(db,concurrent,administartion)
    node2(forms, web)
    shared appl_top is enabled
    the instance is VISION
    i run manintan multi langaul tables from adadmin before runing the nls patch
    after installing arabic, the following error shows when try to open a form "error in opening Oracle* Terminal
    fmrweb"
    can u please help me to fix this issue...thank you

    Try the suggested workaround/solution in the following note (Under "4.1 fmrweb.res").
    Note: 333785.1 - Oracle Applications 11i Internationalization Guide
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=333785.1

  • JSF and Character Sets (UTF-8)

    Hi all,
    This question might have been asked before, but I'm going to ask it anyway because I'm completely puzzled by how this works in JSF.
    Let's begin with the basics, I have an application running on an OC4J servlet container, and am using JSF 1.1 (MyFaces). The problems I am having with this setup, is that it seems that the character encodings I want the server/client to use are not coming across correctly. I'm trying to enforce the application to be UTF-8, but after the response is rendered to my client, I've magically been reverted to ISO-8859-1, which is the main character set for the netherlands. However, I'm building the application to support proper internationalization; which means I NEED to use UTF-8.
    I've executed the following steps to reach this goal:
    - All JSP files contain page directives, noting the character set:
    <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>I've checked the generated source that comes from the JSP's, it looks as expected.
    - I've created a servlet filter to set the character set directly on the request and response objects:
        public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
            // Set the characterencoding for the request and response streams.
            req.setCharacterEncoding("UTF-8");
            res.setContentType("text/html; charset=UTF-8");       
            // Complete (continue) the processing chain.
            chain.doFilter(req, res); 
        }I've debugged the code, and this works fine, except for where JSF comes in. If I use the above situation, without going through JSF, my pages come back UTF-8. When I go through JSF, my pages come back as ISO-8859-1. I'm baffled as to what is causing this. On several forums, writing a filter was proposed as the solution, however this doesn't do it for me.
    It looks like somewhere internally in JSF the character set is changed to ISO. I've been through the sources, and I've found several pieces of code that support that theory. I've seen portions of code where the character set for the response is set to that of the request. Which in my case coming from a dutch system, will be ISO.
    How can this be prevented? Can anyone give some good insight on the inner workings of JSF with regards to character sets in specific? Could this be a servlet container problem?
    Many thanks in advance for your assistance,
    Jarno

    Jarno,
    I've been investigating JSF and character encodings a bit this weekend. And I have to say it's more than a little confusing. But I may have a little insight as to what's going on here.
    I have a post here:
    http://forum.java.sun.com/thread.jspa?threadID=725929&tstart=45
    where I have a number of open questions regarding JSF 1.2's intended handling of character encodings. Please feel free to comment, as you're clearly struggling with some of the same questions I have.
    In MyFaces JSF 1.1 and JSF-RI 1.2 the handling appears to be dependent on the raw Content-Type header. Looking at the MyFaces implementation here -
    http://svn.apache.org/repos/asf/myfaces/legacy/tags/JSF_1_1_started/src/myfaces/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
    (which I'm not sure is the correct code, but it's the best I've found) it looks like the raw header Content-Type header is being parsed in handleCharacterEncoding. The resulting value (if not null) is used to set the request character encoding.
    The JSF-RI 1.2 code is similar - calculateCharacterEncoding(FacesContext) in ViewHandler appears to parse the raw header, as opposed to using the CharacterEncoding getter on ServletRequest. This is understandable, as this code should be able to handle PortletRequests as well as ServletRequests. And PortletRequests don't have set/getCharacterEncoding methods.
    My first thought is that calling setCharacterEncoding on the request in the filter may not update the raw Content-Type header. (I haven't checked if this is the case) If it doesn't, then the raw header may be getting reparsed and the request encoding getting reset in the ViewHandler. I'd suggest that you check the state of the Content-Type header before and after your call to req.setCharacterEncoding('UTF-8"). If the header charset value is unset or unchanged after this call, you may want to update it manually in your Filter.
    If that doesn't work, I'd suggest writing a simple ViewHandler which prints out the request's character encoding and the value of the Content-Type header to your logs before and after the calls to the underlying ViewHandler for each major method (i.e. renderView, etc.)
    Not sure if that's helpful, but it's my best advice based on the understanding I've reached to date. And I definitely agree - documentation on this point appears to be lacking. Good luck
    Regards,
    Peter

Maybe you are looking for

  • I can't update my iPhoto! Help?!

    Whenever I try to update my iPhoto, it says that I used another account to purchase it, but I don't even have another apple account. My older version of iPhoto wasn't even supported by OS X Mavericks?! Why is that?!

  • Can't move files, only duplicate

    hello, i have some files at the root level of my laptop drive and i want to move them, but they only copy into their new locations (duplicating) they don't simply move with the gong sound. i'm wondering why. does it have to do with permissions or som

  • R versiTunes won't open because iTunes library.itl was created by a neweion of iTunes. Hoe can I convert my library to an older version?

    iTunes won't open because iTunes library.itl was created by a newer version of iTunes. How can I convert my library to an older version?

  • Dispactcher not working and here is the log

    trc file: "dev_disp", trc level: 1, release: "640" Mon Dec 24 17:23:21 2007 kernel runs with dp version 128(ext=102) (@(#) DPLIB-INT-VERSION-128) length of sys_adm_ext is 312 bytes sysno      00 sid        PRD systemid   560 (PC with Windows NT) reln

  • "Search in Google" not functioning

    Hi there, Just noticed that when I highlight something in a Mail message, right-click and select "Search in Google", nothing happens. I think it was OK a week ago, I use that feature fairly often. I cannot find anything on it in this forum, so I'm gu