You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ma...@yahoo.com on 2009/12/10 14:45:05 UTC

[S2] i18n not using default bundle

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

Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
Im away from my pc (iphone) so i will let you know tomorrow

Its 8:15pm

On Thursday, December 10, 2009,  <ma...@yahoo.com> wrote:
> Hi,
>
> I tried both, move up and remove just leave Chinese Language there, both still the same, it still take the resource from _en.properties.
>
> Here is my setting
>
> <constant name="struts.locale" value="zh_CN" />
> <constant name="struts.i18n.encoding" value="utf-8" />
> <constant name="struts.custom.i18n.resources" value="resources.global-message"/>
>
> Whether I set struts.locale or not, it make no different. By the way, what is this setting mean?
>
> Regards
> LV
>
>
>
>
> ________________________________
> From: Saeed Iqbal <sa...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Thu, December 10, 2009 2:01:43 PM
> Subject: Re: [S2] i18n not using default bundle
>
> Set the constant variable in struts.xml or struts.properties
> variable for i8nl
>
> On Thursday, December 10, 2009, carl ballantyne
> <ca...@cast-info.es> wrote:
>> Hi LV,
>>
>> When you say you set your browser to Chinese are you simply moving Chinese up the list of prefered languages or are you removing all english from prefered languages. Because if it is the former then I think it would still look for an *_en.properties file over the default.
>>
>> Cheers,
>> Carl.
>>
>> Quoting mailtolouis2020-struts@yahoo.com:
>>
>>
>> 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
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] i18n not using default bundle

Posted by ma...@yahoo.com.
Hi,

I tried both, move up and remove just leave Chinese Language there, both still the same, it still take the resource from _en.properties.

Here is my setting

<constant name="struts.locale" value="zh_CN" />
<constant name="struts.i18n.encoding" value="utf-8" />  
<constant name="struts.custom.i18n.resources" value="resources.global-message"/>

Whether I set struts.locale or not, it make no different. By the way, what is this setting mean?

Regards
LV




________________________________
From: Saeed Iqbal <sa...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Thu, December 10, 2009 2:01:43 PM
Subject: Re: [S2] i18n not using default bundle

Set the constant variable in struts.xml or struts.properties
variable for i8nl

On Thursday, December 10, 2009, carl ballantyne
<ca...@cast-info.es> wrote:
> Hi LV,
>
> When you say you set your browser to Chinese are you simply moving Chinese up the list of prefered languages or are you removing all english from prefered languages. Because if it is the former then I think it would still look for an *_en.properties file over the default.
>
> Cheers,
> Carl.
>
> Quoting mailtolouis2020-struts@yahoo.com:
>
>
> 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
>
>
>
>
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
Set the constant variable in struts.xml or struts.properties
variable for i8nl

On Thursday, December 10, 2009, carl ballantyne
<ca...@cast-info.es> wrote:
> Hi LV,
>
> When you say you set your browser to Chinese are you simply moving Chinese up the list of prefered languages or are you removing all english from prefered languages. Because if it is the former then I think it would still look for an *_en.properties file over the default.
>
> Cheers,
> Carl.
>
> Quoting mailtolouis2020-struts@yahoo.com:
>
>
> 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
>
>
>
>
>
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] i18n not using default bundle

Posted by carl ballantyne <ca...@cast-info.es>.
Hi LV,

When you say you set your browser to Chinese are you simply moving  
Chinese up the list of prefered languages or are you removing all  
english from prefered languages. Because if it is the former then I  
think it would still look for an *_en.properties file over the default.

Cheers,
Carl.

Quoting mailtolouis2020-struts@yahoo.com:

> 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




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] i18n not using default bundle

Posted by ma...@yahoo.com.
I think that is not how the resource bundle work, it is better always set the value without the language suffix 

resources is just a folder name where I store my properties file. 



________________________________
From: Saeed Iqbal <sa...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Fri, December 11, 2009 9:47:15 AM
Subject: Re: [S2] i18n not using default bundle

no need to put resources.

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

> Why dont you just give it the value global-message_zh_CN
>
>
> On Fri, Dec 11, 2009 at 2:44 PM, <ma...@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 <sa...@gmail.com>
>> To: Struts Users Mailing List <us...@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, <ma...@yahoo.com>
>> wrote:
>>
>> > Thanks.
>> >
>> > That is what I plan to do if that is nothing to do with struts.
>> >
>> > Regards
>> > LV
>> >
>> >
>> >
>> > ________________________________
>> > From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
Sorry Sir.

On Fri, Dec 11, 2009 at 5:47 PM, Haroon Rafique
<ha...@utoronto.ca>wrote:

> On Today at 2:47pm, SI=>Saeed Iqbal <sa...@gmail.com> wrote:
>
> SI> no need to put resources.
> SI>
> SI> On Fri, Dec 11, 2009 at 2:45 PM, Saeed Iqbal <sa...@gmail.com>
> wrote:
> SI>
> SI> > Why dont you just give it the value global-message_zh_CN
> SI> >
>
> Saeed,
>
> Slow down a little bit. The original poster got his answer already. An
> empty global-message_zh_CN.properties file did the truck. FWIW, there is
> no problem with putting .properties files in a deeper package (in this
> case "resources").
>
> Cheers,
> --
> Haroon Rafique
> <ha...@utoronto.ca>
>
>
> ---------------------------------------------------------------------
> 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

Re: [S2] i18n not using default bundle

Posted by Haroon Rafique <ha...@utoronto.ca>.
On Today at 2:47pm, SI=>Saeed Iqbal <sa...@gmail.com> wrote:

SI> no need to put resources.
SI> 
SI> On Fri, Dec 11, 2009 at 2:45 PM, Saeed Iqbal <sa...@gmail.com> wrote:
SI> 
SI> > Why dont you just give it the value global-message_zh_CN
SI> >

Saeed,

Slow down a little bit. The original poster got his answer already. An 
empty global-message_zh_CN.properties file did the truck. FWIW, there is 
no problem with putting .properties files in a deeper package (in this 
case "resources").

Cheers,
--
Haroon Rafique
<ha...@utoronto.ca>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
no need to put resources.

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

> Why dont you just give it the value global-message_zh_CN
>
>
> On Fri, Dec 11, 2009 at 2:44 PM, <ma...@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 <sa...@gmail.com>
>> To: Struts Users Mailing List <us...@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, <ma...@yahoo.com>
>> wrote:
>>
>> > Thanks.
>> >
>> > That is what I plan to do if that is nothing to do with struts.
>> >
>> > Regards
>> > LV
>> >
>> >
>> >
>> > ________________________________
>> > From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
Why dont you just give it the value global-message_zh_CN

On Fri, Dec 11, 2009 at 2:44 PM, <ma...@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 <sa...@gmail.com>
> To: Struts Users Mailing List <us...@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, <ma...@yahoo.com>
> wrote:
>
> > Thanks.
> >
> > That is what I plan to do if that is nothing to do with struts.
> >
> > Regards
> > LV
> >
> >
> >
> > ________________________________
> > From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by ma...@yahoo.com.
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 <sa...@gmail.com>
To: Struts Users Mailing List <us...@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, <ma...@yahoo.com> wrote:

> Thanks.
>
> That is what I plan to do if that is nothing to do with struts.
>
> Regards
> LV
>
>
>
> ________________________________
> From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by Saeed Iqbal <sa...@gmail.com>.
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, <ma...@yahoo.com> wrote:

> Thanks.
>
> That is what I plan to do if that is nothing to do with struts.
>
> Regards
> LV
>
>
>
> ________________________________
> From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by ma...@yahoo.com.
Thanks.

That is what I plan to do if that is nothing to do with struts.

Regards
LV



________________________________
From: Alex Siman <al...@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

Re: [S2] i18n not using default bundle

Posted by Alex Siman <al...@gmail.com>.
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