yes you would need to start by populating all localisable text strings into your globalMessages_<locale>.properties files http://struts.apache.org/2.0.14/docs/localization.html
ActionClass.propertiesInterface.properties (every interface and sub-interface)BaseClass.properties (all the way to Object.properties)ModelDriven's model (if implements ModelDriven), for the model object repeat from 1package.properties (of the directory where class is located and every parent directory all the way to the root directory)search up the i18n message key hierarchy itselfglobal resource properties for each call to getText then pass in the key to acquire the localised text string in these implementations: the UI TagsMessages and Errors from the ValidationAware interface (implemented by ActionSupport and ValidationAwareSupport)Within action classes that extend ActionSupport through the getText() method example of getText in UI <s:property value="getText('some.key')" /> NOTE of CAUTION: the lang lookup algorithm uses the provided locale to lookup the accompanying text string romance and germanic languages come from the common EUROPEAN base which originate from single byte character set(s) converting to other languages employing Double Byte Character becomes problematic as representation for each character now takes 16 bits this means that every component,application and bean on the application stack which will lookup that string needs to support DBCS ALSO persisting DBCS information to a Database would require your DB to support DBCS types such as NCHAR,NINTEGER and NVARCHAR Moreover the architects of J2SE left out Hindi support so you will definitely have your work cut out for you http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html I would stick with Single Byte Character Set business languages such as german, french, spanish and italian Once all of the text strings have been placed into globalMessages_<locale>.properties you will be able to easily translate from one language to the next by changing struts.locale=de_DE in struts.properties after your SBCS port is working then port to DBCS (DBCS ports are a big deal and the reason why software companies such as http://www.krishnasoft.com who do localisations do very well) Viel Gluck/Bon Chance/Buena Suerte! Martin Gainty ______________________________________________ Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: muthu.velap...@aspiresys.com > To: user@struts.apache.org > Subject: RE: Localization in struts 2 > Date: Thu, 18 Jun 2009 13:53:10 +0530 > > I think if an app has to support internationalization then all text should > be written from properties file and not through static images content. So, I > would be remove images and try to get write all text from properties file > only. > > For Dynamic Data Issue - I believe you fetch the content from database. If > you want to show them also in hindi then you should maintain that in db as > well. For example: you want show all countries in English as well hindi. > > Then your countries table should be like this > > Countryid name name_hi > name_fr > 1 India <Hindi Translated Content> <French Translated > content> > 2 UK -do- -do- > 3 USA -do- -do- > and so no... > > While fetching you have to pass the ISO language code along with request and > fetch data from respective column. This is one way of solving your issue. I > don’t know how much of dynamic content you want to show like this. If you > have a very huge list then this would be a very difficult job to complete. > > Regards, > Muthu > > -----Original Message----- > From: Johnson nickel [mailto:sarava...@elogic.co.in] > Sent: Thursday, June 18, 2009 1:15 PM > To: user@struts.apache.org > Subject: RE: Localization in struts 2 > > > > Thank you.. it's working fine. I have other issue.. in my application most > of the places i used the images. I want to change images(like > username,password) also in hindi. > > And, using this method, i can display the text from properties file only. in > my application > i have some dynamic data to add some data..for that i need to display in > hindi only.. > > Can you me a suggestions it will be helpful for further work. I 'm using > struts 2 framework. > > > Muthu Velappan wrote: > > > > Try this... > > > > Take a copy of ur current properties file and name it as > > hinditext.txt(save > > it in UTF-8 format) > > > > Now open command prompt and go to your <JAVA_HOME>/bin folder and run this > > command > > > > native2ascii -encoding UTF-8 <full path of hinditext.txt file> > > <app_hi.properties> > > > > Now rename this app_hi.properties file with respect to ur application > > properties file and copy to the required place. Restart the server you > > should be able to see the hindi text properly in browser. > > > > Hope this solves your problem. > > > > Thanks, > > Muthu > > > > -----Original Message----- > > From: Johnson nickel [mailto:sarava...@elogic.co.in] > > Sent: Thursday, June 18, 2009 12:28 PM > > To: user@struts.apache.org > > Subject: Re: Localization in struts 2 > > > > > > I have tried to copy the properties files text and opening in notepad > > while saving i had selected the encoding type as UTF-8. But still i'm not > > able to see the hindi text in browser. > > > > And in my jsp i have added , > > <%@ page language="java" pageEncoding="utf-8" > > contentType="text/html;charset=utf-8"%> > > <meta equiv="Content-Type" content="text/html; charset=UTF-8"> > > > > > > > > Girish Naik wrote: > >> > >> Is the Hindi text specified in the file in UTF8 format? ie /u0092 etc. > >> > >> > >> > >> Regards, > >> --------------------------------------------------------- > >> Girish Naik > >> Mobile:-+91-09740091638 > >> girish.n...@gmail.com > >> > >> Mitch > >> Hedberg<http://www.brainyquote.com/quotes/authors/m/mitch_hedberg.html> > >> - "I drank some boiling water because I wanted to whistle." > >> > >> On Thu, Jun 18, 2009 at 10:45 AM, Johnson nickel > >> <sarava...@elogic.co.in>wrote: > >> > >>> > >>> Hi all, > >>> > >>> I have tried the Struts2i18n sample project it's working fine. > >>> But > >>> i > >>> need to > >>> implement local language in the same manner. I have created > >>> ResourceBundle_Hi.properties for > >>> hindi language. I had specified the hindi text in this file. when i try > >>> to > >>> execute the application > >>> it shows some नाम: or ???. It's not actually taken the proper > >>> file.Give me a suggestions for this > >>> issue > >>> -- > >>> View this message in context: > >>> http://www.nabble.com/Localization-in-struts-2-tp24086510p24086510.html > >>> Sent from the Struts - User mailing list archive at Nabble.com. > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >>> For additional commands, e-mail: user-h...@struts.apache.org > >>> > >>> > >> > >> > > > > -- > > View this message in context: > > http://www.nabble.com/Localization-in-struts-2-tp24086510p24087439.html > > Sent from the Struts - User mailing list archive at Nabble.com. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/Localization-in-struts-2-tp24086510p24088035.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _________________________________________________________________ Microsoft brings you a new way to search the web. Try Bing™ now http://www.bing.com?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try bing_1x1