struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saeed Iqbal <saee...@gmail.com>
Subject Re: [S2] i18n not using default bundle
Date Fri, 11 Dec 2009 09:47:15 GMT
no need to put resources.

On Fri, Dec 11, 2009 at 2:45 PM, Saeed Iqbal <saeedcs@gmail.com> wrote:

> Why dont you just give it the value global-message_zh_CN
>
>
> On Fri, Dec 11, 2009 at 2:44 PM, <mailtolouis2020-struts@yahoo.com> wrote:
>
>> yes, I did have
>> <constant name="struts.custom.i18n.resources"
>> value="resources.global-message"/>
>>
>> so to make it work, what I do now is in my resources folder, I'll have
>> global-message.properties, global-message_en.properties and
>> global-message_zh_CN.properties (an empty file)
>>
>>
>>
>>
>> ________________________________
>> From: Saeed Iqbal <saeedcs@gmail.com>
>> To: Struts Users Mailing List <user@struts.apache.org>
>> Sent: Fri, December 11, 2009 5:41:44 AM
>> Subject: Re: [S2] i18n not using default bundle
>>
>> why dont you just use this
>>
>> struts.custom.i18n.resources=package
>>
>> and put your CN file name in there.
>>
>> On Thu, Dec 10, 2009 at 10:31 PM, <mailtolouis2020-struts@yahoo.com>
>> wrote:
>>
>> > Thanks.
>> >
>> > That is what I plan to do if that is nothing to do with struts.
>> >
>> > Regards
>> > LV
>> >
>> >
>> >
>> > ________________________________
>> > From: Alex Siman <aleksandr.siman@gmail.com>
>> > To: user@struts.apache.org
>> > Sent: Thu, December 10, 2009 4:54:26 PM
>> > Subject: Re: [S2] i18n not using default bundle
>> >
>> >
>> > The trick is simple:
>> > create an empty file:
>> > global-message_zh_CN.properties
>> >
>> > This is not Struts 2 problem, but Java ResourceBundle's.
>> > You can read more here:
>> > http://old.nabble.com/Struts2-%2B--I18N-td24973817.html#a24978732
>> >
>> > mailtolouis2020-struts@yahoo.com wrote:
>> > >
>> > > Hello,
>> > >
>> > > I got a doubt on struts 2 i18n. I'm using S2. 2.1.8.1.
>> > >
>> > > I got 2 properties in my application:
>> > > global-message.properties    (store Chinese Language)
>> > > global-message_en.properties (store English Language)
>> > >
>> > > When I run my application, and set my browser language to Chinese
>> > (zh-CN),
>> > > I expect when there is no global-message_zh_CN.properties file, struts
>> > > should use the default global-message.properties file, but it is not,
>> it
>> > > use global-message_en.properties.
>> > >
>> > > If I remove some key in the global-message_en.properties, then it is
>> look
>> > > for global-message.properties file, that is expected.
>> > >
>> > >
>> > > So could someone tell me is this a bug, or that's the way the design
>> is
>> > or
>> > > some setting I need to do?
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > Regards
>> > > LV
>> > >
>> >
>> > --
>> > View this message in context:
>> >
>> http://old.nabble.com/-S2--i18n-not-using-default-bundle-tp26727458p26730713.html
>> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>>
>>
>>
>> --
>> Saeed Iqbal
>> Independant Consultant
>> J2EE - Application Architect / Developer
>>
>
>
>
> --
> Saeed Iqbal
> Independant Consultant
> J2EE - Application Architect / Developer
>
>


-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message