You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Arie Fishler <ar...@gmail.com> on 2009/08/27 17:32:23 UTC

Male/Female messages

Hi,

Assuming that I am localizing to a language that has different text required
for male and female is there a generic way for hadling that. This is of
course based on the fact that I can provide a user object that contains that
property (if the user is a male or female)

I can think of a convention that will add to all resource file keys a
.female extension to handle female text if required and wrap the
ResourceModel with an object that will get the user. Using the gender
property of the user it will manipulate the key to add the .female extension
if required, check if the female text exist at all (and if no default to the
no extension version) etc.

This may work. Are there any other suggestions? What about the
wicket:message markup that goes directly to the resource files...how do I
handle that? (I have lots of markup already so changing all of it to labels
is not the easiest way)

Thanks,
Arie

Re: Male/Female messages

Posted by Pedro Santos <pe...@gmail.com>.
This remember me an idea. Will to be very helpful if wicket worked with
syles hierarchy. For example, I worked on a application that have 3  styles:
"style1_grayscale", "style1_colored", "style2".
In some css files for example, would be useful to write just the
"somePanelCssFile_style1.css", that can to be reached by the 2 sessions
styles: "style1_grayscale", "style1_colored"
Currently I have to copy the same css file in some cases, to be reached by
the 2 styles: "style1_grayscale", "style1_colored"

On Fri, Aug 28, 2009 at 3:34 PM, Arie Fishler <ar...@gmail.com> wrote:

> Actually a good solution. I am already using styles for skin diffrentiation
> but can certainly combine the male/female to that. Simple and clean.
>
> Thanks
>
> On Thu, Aug 27, 2009 at 6:35 PM, Cserep Janos <cs...@szeretgom.hu>
> wrote:
>
> > use setStyle()  and different styles for property files. That means
> > you should have 2 files:
> >
> > MyApplication_male.properties
> > MyApplication_female.properties
> >
> > j
> >
> >
> > On Thu, Aug 27, 2009 at 5:32 PM, Arie Fishler<ar...@gmail.com> wrote:
> > > Hi,
> > >
> > > Assuming that I am localizing to a language that has different text
> > required
> > > for male and female is there a generic way for hadling that. This is of
> > > course based on the fact that I can provide a user object that contains
> > that
> > > property (if the user is a male or female)
> > >
> > > I can think of a convention that will add to all resource file keys a
> > > .female extension to handle female text if required and wrap the
> > > ResourceModel with an object that will get the user. Using the gender
> > > property of the user it will manipulate the key to add the .female
> > extension
> > > if required, check if the female text exist at all (and if no default
> to
> > the
> > > no extension version) etc.
> > >
> > > This may work. Are there any other suggestions? What about the
> > > wicket:message markup that goes directly to the resource files...how do
> I
> > > handle that? (I have lots of markup already so changing all of it to
> > labels
> > > is not the easiest way)
> > >
> > > Thanks,
> > > Arie
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: Male/Female messages

Posted by Arie Fishler <ar...@gmail.com>.
Actually a good solution. I am already using styles for skin diffrentiation
but can certainly combine the male/female to that. Simple and clean.

Thanks

On Thu, Aug 27, 2009 at 6:35 PM, Cserep Janos <cs...@szeretgom.hu> wrote:

> use setStyle()  and different styles for property files. That means
> you should have 2 files:
>
> MyApplication_male.properties
> MyApplication_female.properties
>
> j
>
>
> On Thu, Aug 27, 2009 at 5:32 PM, Arie Fishler<ar...@gmail.com> wrote:
> > Hi,
> >
> > Assuming that I am localizing to a language that has different text
> required
> > for male and female is there a generic way for hadling that. This is of
> > course based on the fact that I can provide a user object that contains
> that
> > property (if the user is a male or female)
> >
> > I can think of a convention that will add to all resource file keys a
> > .female extension to handle female text if required and wrap the
> > ResourceModel with an object that will get the user. Using the gender
> > property of the user it will manipulate the key to add the .female
> extension
> > if required, check if the female text exist at all (and if no default to
> the
> > no extension version) etc.
> >
> > This may work. Are there any other suggestions? What about the
> > wicket:message markup that goes directly to the resource files...how do I
> > handle that? (I have lots of markup already so changing all of it to
> labels
> > is not the easiest way)
> >
> > Thanks,
> > Arie
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Male/Female messages

Posted by Cserep Janos <cs...@szeretgom.hu>.
use setStyle()  and different styles for property files. That means
you should have 2 files:

MyApplication_male.properties
MyApplication_female.properties

j


On Thu, Aug 27, 2009 at 5:32 PM, Arie Fishler<ar...@gmail.com> wrote:
> Hi,
>
> Assuming that I am localizing to a language that has different text required
> for male and female is there a generic way for hadling that. This is of
> course based on the fact that I can provide a user object that contains that
> property (if the user is a male or female)
>
> I can think of a convention that will add to all resource file keys a
> .female extension to handle female text if required and wrap the
> ResourceModel with an object that will get the user. Using the gender
> property of the user it will manipulate the key to add the .female extension
> if required, check if the female text exist at all (and if no default to the
> no extension version) etc.
>
> This may work. Are there any other suggestions? What about the
> wicket:message markup that goes directly to the resource files...how do I
> handle that? (I have lots of markup already so changing all of it to labels
> is not the easiest way)
>
> Thanks,
> Arie
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org