Does anybody know how to support languages such as Chinese, Korean both in menu and portlets?
Thanks in advance, John > -----Original Message----- > From: Harald Schl��er > [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 24, 2003 12:40 AM > To: 'Jetspeed Users List' > Subject: AW: Internationalization of Menus > > Hi Mark! > > Yes, your suggested solution works fine. Thank you! > I just enhanced the Jetspeed tool with this: > > <code> > import > org.apache.turbine.services.localization.Localization; > .... > > public static String localize(RunData data, > String value_to_localize) > { > String result = null; > try > { > result = > Localization.getString(Localization.getDefaultBundleName(), > Localization.getLocale( ((RunData) > data).getRequest() ), value_to_localize); > } > catch (Exception e) > { > Log.error(e); > result = value_to_localize; > } > > return result; > } > </code> > > Now I set the title of my portlets this way: > > <title>MY_PORTLET_TITLE</title> > > By calling 'localize' now no '$l10n.' prefix is > needed. If the title doesn't > occur in the resource bundle it will be used the way > it is. > > Harry > > > -----Urspr�ngliche Nachricht----- > Von: Mark Orciuch [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 23. Juni 2003 17:28 > An: Jetspeed Users List > Betreff: RE: Internationalization of Menus > > > It's an interesting problem. Here's what you can do > without any > modifications to Jetspeed: > > 1. Create your model psml. > 2. Clone it for each language. > 3. Customize portlet titles for each language. > > All of the above can be done using the Psml Browser > when logged on as admin. > > Now for the real solution (or one of them): > > 1. In registry, for localized portlets, instead of > title use something like > "$l10.PORTLET_TITLE_STRING". > > 2. Enhance JetspeedTool with method <public String > localize(RunData data, > String value_to_localize)>. This method will > localize everything prefixed > with "$l10n". Or write your own pull tool. > > 3. Modify jetspeed.vm to say: > > $jetspeed.localize($data,$portlet_instance.Title) > > ... instead of ... > > $portlet_instance.Title > > 4. Localize the portlet title in portlet customizer > using the same method > ("current_title" in customizer-portlet.vm): > > <input type="text" name="current_title" > value="$jetspeed.localize($data,$current_title)" > size="50"> > > I have not tried this so there may something I > haven't thought of. But > theoretically, it should work. > > Best regards, > > Mark Orciuch - [EMAIL PROTECTED] > Jakarta Jetspeed - Enterprise Portal in Java > http://jakarta.apache.org/jetspeed/ > > > -----Original Message----- > > From: Harald Schl��er > [mailto:[EMAIL PROTECTED] > > Sent: Monday, June 23, 2003 7:34 AM > > To: '[EMAIL PROTECTED]' > > Subject: Internationalization of Menus > > > > > > Dear Jetspeed-Users! > > > > When I organize portlets in a menu pane, each menu > entry has the > > portlet title as its name. Now I want this menu > entries change their > > name depending on the language the > > user chose. > > The title of my portlet is only defined once in my > *.xreg file. > > > > So, how can I change the title of the portlet? > > How can I use the localization tool to change the > title depending on > > the current language? > > > > Any hint will be helpful! > > Thank you in advance! > > > > Harry > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
