Internationalization in JSP

I have four different language names
>
English, German, French, Spanish
inside index.jspAll fours are under hyperlinked.
TO DO is:
when user clicks this, the value of English (=EN), the value of German (=DE),
respectively will be passed to the method called,
>
setThisLocale("EN"); or setThisLocale("DE")
this method will call getBundle method.
there won't be any form and submit button How can I implement this?
How other people have done internationalization in JSP?
Thanks in advance -
Edited by: seldon.paul on May 11, 2010 12:39 AM

See here [JSP I18N|                                                                                                                                                                                                                                           

Similar Messages

  • Internationalization in jsp,struts

    I have retrieve german data from database as well as messages in ApplicationResources.properties file.
    I am using UTF-8 encoding to display characters. The code given below
    <%@ page pageEncoding="UTF-8" %> <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    It displays correctly the data coming from database But the same time, messages coming from message resources are converted in junk characters.
    FYI: i saved the both file (jsp and properties) encoding type as UTF-8
    Please give your suggestion.
    by,
    Sikkandar

    sikkandar_5499 wrote:
    I have retrieve german data from database as well as messages in ApplicationResources.properties file.
    I am using UTF-8 encoding to display characters. The code given below
    <%@ page pageEncoding="UTF-8" %> <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    It displays correctly the data coming from database But the same time, messages coming from message resources are converted in junk characters.
    FYI: i saved the both file (jsp and properties) encoding type as UTF-8
    Please give your suggestion.
    by,
    SikkandarMy guess is that the message resources aren't unicode. You need to convert them.
    It works if you do it properly. I've gotten it to work with Japanese.
    %

  • Internationalization for JSP

    I can't i18ned my JSPs pages. SJSS can find string in java but it can't find string between:
    my texte <How internationalized HTML/JSP page with SJSS/NetBeans ?

    The I18N support found in the Tools menu of Sun Java Studio or NetBeans is designed to help with I18N tediousness in a J2SE program.
    Doing I18N in JSPs is a bit harder than in a J2SE program, since you want to base the text lookup not on the server's context, but on the client's context.
    The following article does a good job of explaining how to do it: http://java.sun.com/developer/technicalArticles/Intl/MultilingualJSP/

  • Help with Internationalization using JSP in 9ias

    Hi i have problem running following JSP file in OC4J
    when i run same JSP in Tomcat i can see my String in Arabic
    but its not the case with OC4J.
    I even tried to set the content using
    response object
    <% response.setHeader("Content-Type","text/html; charset=iso-8859-6");%>
    please adivse ...
    looking forward to hear from anyone.
    JSP file
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-6">
    </head>
    <html>
    <body>
    <table border="1" width="400">
    <tr>
    <td><b>Date</b></td>
    </tr>
    <%
    String e = "GdaGcS";
    <tr>
    <td><%=e%></td>
    </tr>
    </table>
    </body>
    <html>

    What is the executable you are trying to debug? A DLL that is called from java?
    So your VC project is a DLL? (It's really hard to tell from your posts).
    If so, then suppose you have this folder structure:
    {dll_project_folder}
    {dll_project_folder}\debug\mylib.dll
    {java_project_folder}
    {java_project_folder}\MyJavaClass.class
    Then your VC project settings should be:
    Command : {java_root_folder}\bin\java.exe
    Command Arguments : -classpath {java_project_folder} MyJavaClass
    Working Directory : {dll_project_folder}\debug
    Regards

  • Getting junk in graph while i18n

    hi,
    When i try to i18n or internationalize a jsp in which JFREE chart is displayed. In that graph x-axis and y-axis value showing junk characters in some machine and proper characters in some other machine .any specific conditon is nedded or any JAR to be uploaded.upto my knowledge i cant find any difference bt the machine which shows junk with machine shows proper character.any help will be appreciated.
    thanx,
    flyingtaurus

    Hi ,
    I am also facing similar problem.My system is unicode enabled and i am using the device type I8SWIN and courier font .
    But still i am getting junk characters for Hebrew characters in PDF.
    Can any one suggest me what is the exact device type we have to use for unicode enabled system and also for non unicode enalbled system.
    Is any related to truetype font here .Kindly let me know .
    Thanks for your valuable inputs .
    PRadeep....

  • Guinea Pigs Needed ;-)

              Faced with web based reporting issues? Need to support multi-lingual site development.
              Sessions and URL rewritting spoiling your day?
              JSPFrame virtually eliminates Java in your JSP. A series of Tags (Dreamweaver extensions
              avail.) provide access to JSPFrames comprehensive features such as:
              Form Management &#8211; Stateful, and logical definitions
              Report Writer &#8211; Calculation engine, grouping, sub-totalling etc.
              Internationalization features
              JSP&#8217;s built against JSPFrame produce significantly less Java code and can be
              easily understood by both HTML and Java developers.
              Built on the MVC approach, JSPFrame is a developer extensible framework with user
              configurable .XML files
              JSPFrame works across any Servlet 2.2 compliant AppServer and has been tested against
              TomCat 3.2x, WebLogic 6 and OrionServer.
              Fully documented, JSPFrame includes a demonstration application to get you started.
              We are urgently looking for developers to review/evaluate/implement in partnership
              with Monowai. Visit http://www.monowai.com/jspframe for further information or send
              an email to jspframe@monowai to register your interest.
              HaH
              

    Alice when you use HyperlinkShader, are you shading just your CSS files or the iWeb file too. I would not use this application on your iWeb file as the "file" they're referring to here is the index.xml file within your domain file. Eeek. I don't want any third-party messing with that.
    I reviewed the source code they posted at their web site and nowhere did I find any reference to manipulation of the TemplatesInfo.plist file. That's the file that would have to be altered to remove registration of your third-party templates. Well, that's the file that tells iWeb to include the template in the list. The actual files have to be installed to the template directory as well.
    If it isn't too much trouble, recreate the situation on your machine and send me your PLIST file once the templates have been booted out of the list. Also, check this path and let me know if the actual template files are missing:
    /Applications/iWeb/Contents/Resources/Shared/
    All of my templates are installed to this folder, but other developers may not be using the 1.1 installation location so theirs may be in the old location:
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/About Me/
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/Blog/
    /Applications/iWeb/Contents/Resources/English.lproj/Templates/Movie/
    ...and so on...
    If the templates are still in the folder(s) that's one thing. If they've been unregistered in the TemplatesInfo.plist, that's another. There's no reason that HyperlinkShader should be going anywhere near either of these things. They're totally unrelated.
    Suz

  • Problem of JSP internationalization

    Hi,
    I am using tomcat3.x as web server and try to display multibyte characters in JSP page.
    I tried the following two methods:
    1. at the begiinging of the jsp file I added :
    <%response.setContentType="charset=xxx"%>
    2. added <meta charset="xxx"> into JSP file
    The first method can display correct characters in Tradtional Chinese, Simplified Chinese or Korean if I changed the "xxx" to "big5", "gb2312" or korean charset
    But it can't display Japanese characters correctly even if I already changed "xxx" to "shift_jis"
    However, if I use the method 2, then all the double byte characters can be displayed correctly.
    Does somebody see this problem before? Would you please let me know why the first method doen't work for Japanese? Are there any setting wrong in web server ?
    Thanks,
    Ping

    I used the following page directive and it seemed to do the trick. It didn't work in Netscape 4x but I know that's a whole different ball game. I'm using iPlanet as my web/app server...
    <%@ page contentType="text/html; charset=Shift_JIS">
    - Billy -

  • Applying Java's internationalization facilities to a web application

    Hello,
    I am a member of a software developing team (using Java-based technologies). Our web application consists of a:
    1. static part (HTML-based pages), and
    2. a dynamic part (using JSPs and servlets, mainly)
    The static part of our web site is currently supported in four languages, having our html pages replicated four times. On the other hand, the dynamic part of our web (that is, the part of our web site restricted to authorized
    users only, using JSPs and servlets) is only supported in one of those languages and we are thinking of extending it to support, at least, one more of the other languages. Obviously, it wouldn't be manageable replicating the JSP
    pages (about a hundred or so) for the new language, so we are thinking of using Java's internationalization facilities. According to what I have understood, we have two possibilities, basing the internationalization process on:
    a. properties files (one for each language?)
    b. class files
    Knowing all this, our problem is a matter of organization of those approaches. How could I organize the different files? Should I use a database to store the messages, instead of using files (either properties files or class files)? Or might I create different files depending on where the string texts appear? For example, create a
    properties file or a class file containing the different string messages in every JSP file? Any other ideas of organization or design would be highly appreciated. Do you know any other web site where internationalization has been applied or case studies dealing with this matter?
    Thanks in advance.

    >
    Knowing all this, our problem is a matter of
    organization of those approaches. How could I organize
    the different files? Should I use a database to store
    the messages, instead of using files (either
    properties files or class files)? Or might I createYou could go with using Java's existing resource bundle facilities to work with localized resource bundles stored in files. Whether that be list or property resource bundles, the code is already written to load and manage resource bundles in these formats. I have personally worked with database-backed resource bundles, but that required custom code to be written.
    On a performance note, list resource bundles are found before property resource bundles. In a development environment, I've used property resource bundles and when moving an application into production, I have gone through the conversion of the property to list resource bundle format. There's a utility in our book, "Java Internationalization" (O'Reilly) which does conversion from property to list resource bundle format for you.
    different files depending on where the string texts
    appear? For example, create a
    properties file or a class file containing the
    different string messages in every JSP file? Any other
    ideas of organization or design would be highly
    appreciated. Do you know any other web site where
    internationalization has been applied or case studies
    dealing with this matter?Also in our book, we advocate using different resource bundles for holding different types of localized data. For example, there's nothing that says you cannot have resource bundles devoted to user exception messages, status messages, regular text, prompt text, etc... By splitting up your resources into different categories and placing them in an appropriately named resource bundle, you can know exactly where certain resources will be pulled from when your application is running.
    >
    Thanks in advance.Hope this helps.
    -David

  • Chinese character Display for Date from Gregorian calendar in JSP

    Hi
    I am doing internationalization for my JSPs, as part of that i am doing character encoding to utf-8(for chinese/japanese). Evrything is fine..
    Now the problm is i am displaying gregorian calendar to select date in a small window using some javascript code...
    For default encoding it is working fine....for utf-8 or other encoding it is raising error.(may be javascript)and also the date is nto displaying properly..i think the problem would be in javascript/.
    So can you pls tell me how to over come this problm...
    thanks in adance...
    regards
    bhaskar

    Sorry ..forgot to include the output...
    this is the output i am getting instead of 29-Nov-2005 00:00:00
    29-A-2005 00:00:00

  • Images and .properties(bunldes) files are not being found from my JSPs

    Hi,
    I have created .ear file by using ANT Application. And deployed into Oracle9iAS(OC4J). Here problem is that images and .properties(internationalization bundles)files are not found from JSPs.
    Here is my directory structure.
    public_html--->locale -->BusinessEntity -->businessentity_en_US.properties
    --->enterprise -->images -->knowldege.jpg
    --->BusinessEntity-->BEAdd.jsp
    in my jsp bundle(.properties)file is accessed like this:-
    <i18n:bundle baseName="/locale/-->BusinessEntity/businessentity" id="businessentity" locale="<%= locale %>" />
    in my jsp images accessed like this:-
    src="/enterprise/images/knowldege.jpg".
    In my working environment, without creating .ear file, images and .properties files are being found my JSPs. But if i create .ear file and after deploy, images and .properties files are not being found my JSPs.
    please let me know where i might did wrong
    thanks in advance
    srinivas

    Hi i am again. Here is my configuration files(server.xml and default-web-site.xml)
    server.xml :-
    <?xml version="1.0"?>
    <!DOCTYPE application-server PUBLIC "-//Evermind//DTD Orion Application-server//EN" "http://xmlns.oracle.com/ias/dtds/application-server.dtd">
    <application-server application-directory="../applications"
    deployment-directory="../application-deployments"
    >
         <library path="../tools.jar" />
         <rmi-config path="./rmi.xml" />
         <jms-config path="./jms.xml" />
         <log>
              <file path="../log/server.log" />
         </log>
         <transaction-config timeout="30000" />
         <global-application name="default" path="application.xml" />
         <application name="nalluri" path="../applications/trainiumear.ear" auto-start="true" />
         <global-web-app-config path="global-web-application.xml" />
         <web-site path="./default-web-site.xml" />
         <cluster id="-1640090707" />
    </application-server>
    default-web-site.xml:-
    <?xml version="1.0"?>
    <!DOCTYPE web-site PUBLIC "Orion Web-site" "http://xmlns.oracle.com/ias/dtds/web-site.dtd">
    <web-site port="8888" display-name="Default Oracle9iAS Containers for J2EE Web Site">
         <default-web-app application="nalluri" name="Commonwar" />
         <access-log path="../log/default-web-access.log" />
    </web-site>
    thanks in advance
    wating for reply
    srinivas

  • Internationalization for more than 2 countries

    I created tiny application (http://01.sk/i18nP2.zip) with 4 locales (US, GERMANY, FRANCE, ITALY). It shows current session locale.
    I placed button in the view which changes the locale of current user to next locale (US->DE->FR->IT->US).
    However when I use full locale (language and country specified) it doesn't work - only 2 languages are shown correctly (button and label texts). Other 2 languages are shown in the locale which was active for this user at deployment time. English-US locale is always OK.
    When I comment locale-switching code and ucomment other one which uses language-only locales (ENGLISH->GERMAN->FRENCH->ITALIAN) application can work correctly.
    However I can't get country specific stuff like currency symbol/formatting (which is different for all countries using the same language).
    Is it bug in WebDynPro 2.0.11 (200502210240) or SAP server (W32/INTEL 7.5.0 Build 019-121-082-363) or I just don't understand something?

    The link is for JSP internationalization. Part 2 is considering WebDynpro application but using such resource bundles requires for each text additional command in source code. My application is using automatic builtin system that replaces all static texts (my boss requires to use all builtin "systems" when available). This automatic system works fine when you working with languages. But it stops working when you specify country too (or when you use more than 1 non-english country).

  • How to configure JSTL for internationalization

    Hi,
    I am implementing internationalization for one of the my project.I created three properties files for English,Japanese and french(file name like ApplicationResource_fr_FR ...).Based on language selection i am setting current locale in Session.In Jsp page . i write code like these
    <% Locale userLocale = (Locale)session.getAttribute("locale");
    %>
    <fmt:setBundle basename = "ApplicationResource"/>
    <fmt:setLocale value="<%=userLocale%>"/>
    Now it's working fine.But it's showing only ApplicationResource properties files values. Based on locale it doesn't identify Resource file. If select French it should load ApplicationResource_fr_FR property file. But it's show only default property file( ApplicationResource).
    What is the pblm

    1. Under channel attributes of an AS2 channel for the trading partner, the Ack Mode has been set to: Async
    2. Under Exchange Protocol Parameters, Receipt Delivery Option was set to, http://<host>:<port>/b2b/httpreceiver.
    I think, this configuration started working.... Please let me know if any other config I missed.
    Thanks
    Levey

  • Difficulty with java Unicode for internationalization

    First, my appologies for the cross-post. I'm not sure if this is a
    configuration issue, simple java / jsp problem or something others
    performing internationalization may have encountered.
    We're generating UTF-8 HTML pages using .jsp's, Weblogic 5.1 sp5, jdk
    1.2.2 and NT 4.0 w/ the Euro patch.
    We have the ability to serve UTF-8 encoded data from flat files and our
    database but we're having some problems serving Unicode that have been
    "escaped" into java variables.
    If we use the &#nnnnn (nnnn is decimal unicode value for character) HTML
    method for displaying unicode characters, they display just fine.
    However, if we create a java String or char and push a character into it
    via \uNNNNN (NNNNN is hex unicode value for character) and then display
    the content of this variable through the HTML page, something goes
    awry. Here's an example:
    <% String checkChar = new String("\u0000");%>
    <td class="smallfont"><% checkChar = "\u00A5";%><%=checkChar%></td>
    <td class="smallfont"><% checkChar = "\u20A5";%><%=checkChar%></td>
    <td class="smallfont"><% checkChar = "\u30A5";%><%=checkChar%></td>
    This should display the Yen symbol, Mil Sign and a Katakana small 'u',
    respectively. Oddly enough, it displays the Yen symbol all three
    times. I've had similar results with other series of Unicode characters
    (several Unicode characters that share the same second hex digit.)
    If you want to see this via HTML, check out
    http://dev.slingshotcorp.com/char.jsp.
    We've added "-Dfile.encoding=UTF8" to the java invocation in
    startWebLogic.cmd and we've verified that the setting is persisted into
    the .jsp. Unfortunately, our output isn't affected.
    Anyone know what I'm doing wrong? It appears that java is somehow
    assuming the first hex digit is always "00." Does this sound familiar
    to anyone?
    Thanks - Jackson

    Hello Earl,
    I was having similar problem.
    I was able to display &#nnnnn and the chinese character
    from database, but not \unnnn.
    I think Kevin Burns was making a good suggestion by
    giving page directive in your jsp file (UTF8) 'cause that's what
    I did AND it started to display \unnnn just fine from
    my property bundle files. You may give a try!
    But my problem is that after I gave the UTF8 page directive,
    the stuff I'm reading from db (oracle 8.1.6, with NLS_LANG)
    displayed as garbage. Do you think it's because that
    WLS supports only Unicode?
    thanks,
    --Renqi Li
    Earl Bob wrote:
    Has any else come across this gem? I think this is the root of my problem.
    "Caution: Currently, WebLogic JSP only supports 8-bit character sets. "
    http://www.inf.fu-berlin.de/lehre/WS00/SWT/BEA/documentation/docs51/classdocs/API_jsp.html
    The most recent Weblogic documentation has revised this statement to:
    "WebLogic JSP supports mulitbyte character sets according to the Unicode
    standard. "
    http://www.weblogic.com/docs51/classdocs/API_jsp.html#wljsp
    We believe that the 16-bit characters we're passing around through Java
    variables are being cliped to 8-bit characters as they're written to HTML.
    Does anyone know when (which service pack) provided WL 5.1 JSP with the
    ability to handle multi-byte charactersets? We're currently using WL 5.1
    sp5.
    Thanks - Jackson

  • Internationalization in content server

    I am developing a portal application that needs to support English/French. So far I found ways to translate everything except content coming from content server.
    I was planning to create entry templates where content authors would enter the content in both languages, in the presentation template I was going to use a pcs tag to display the proper content based in user locale. Is that possible?
    I haven't found a way to pass/read user properties in content server?
    Is there any other way to do internationalization in content server?
    Thanks

    The Content Server's Presentation Template is only evaluated at the time of publishing. This generates a file that is stored outside of the Content Server which is generally accessed through a webserver. This means that you cannot use the Presentation Template language to change the content based on the user viewing the page.
    The Content Server does not currently have tools dedicated to supporting localization of published pages. You can use the Content Server to manage content in multiple languages. By publishing a Content Item as a JSP or ASP page you can dynamically choose the content to display to the user. Or you could create two Content Items, one representing each language, and direct the user to the appropriate page.

  • Internationalization of Error Message

    Hi, All
    I am using Weblogic 6.1 SP1 and Portal Sever 4.0.
    The requirement is all the site has to be internationalization.
    Right now I am able to have both English and French for all
    the static lable in my JSP by using <i18n:getMessage
    messageName="main_lbl_service"/> and bundle property.
    For all the data in the Oracle Database, I have created an filter
    in JSP to get user specify language item, each item associated with
    a language ID in Catalog.
    My question is about the error message, like the message I want to
    send to user after validation, those message has to be international.
    Let say, in my Validator, I want to send different language message
    to different user who is using French or Chinese. Can I use message
    catalog that is provied by BEA, or I have to use bundle to get the
    message in my validator? If yes, how can I access the BUNDLES
    within my validator?
    Thanks in advance!
    J2EE

    i am puting across the complete scenario of this problem.
    I have created a simple widget to directly enter in the se38 transaction in SAP-ABAP.I have created 2 files.
    My tra.sap file contains---System
    Name="AD4"
    Client="100"
    User
    Name="in016508"
    Password="mandar"
    Language=EN
    Function
    Command=SE38
    Title=ABAP Editor
    Type=Transaction.
    And my se38.kon file contains --
    <?xml version="1.0" encoding="UTF-8"?>
    <widget version="4.5" minimumVersion="2.1">
    <debug>off</debug>
    <window title="Shortcut Widget">
    <name>ShortCut</name>
    <width>128</width>
    <height>128</height>
    <visible>1</visible>
    </window>
    <image src="winter.png">
    <name>IconImage</name>
    <onMultiClick>
    filesystem.open("tra.sap");
    </onMultiClick>
    </image>
    </widget>
    After executing with the help of yahoo widget engine,the widget is not able to login in SAP sysytem and giving error message as--
    Input field contains prohibited characters(already deleated).
    If the user is already loged on the system then widget is running fine.
    widget foundation is also installed on the system.
    So what is the appropriate solution to this problem?

Maybe you are looking for

  • How to use a select list value in a PL/SQL function body returning SQLquery

    Hi Friends, I have a select list P6_TEST with values 'nav' anf 'jyo'. I am trying to create a report using "SQL Query (PL/SQL function body returning SQL query)". In my report query can i check if P6_TEST='nav' and do something like the code shown be

  • Sharing iphoto events on local network

    I have shared my iphoto library and can read and transfer photo from one to another mac. but only with album? the events do not show up, only the album? is it possible to transfer one or more events from one to another mac? if I need to make album of

  • Problem with setting up dependencies in DAC 10.1.3.4.1

    Hi, We have recently installed DAC 10.1.3.4.1 with Informatica 8.6. Previously we were using DAC 7.8.2 and had various execution plans. In the old DAC, there are options to define tasks dependent and depends on the task. How can we achieve this depen

  • WebUtil Demo OLE test doesn't work

    Hi I have downloaded the WebUtil demo and all tabs/functionalities in the form WU_TEST_105 works except the OLE test. When I click on the button "Write to Word" the form just hangs/freezes adn nothing happens. I added the lines webutillogging=console

  • Jacob and Tables

    Hi all, I have a word document that contains 3 tables. How can I add a row to table number 2 and how can I add text in a specific cell of table 2. Thanks in advance for your help. Best regards. Saadi MONLA