• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

any solution to use two or more Locales at the same time ?

 
Ghazi Jamal
Greenhorn
Posts: 8
Hibernate Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, (i'm jsf 1.2 user and excuse my bad english )
For a specific purpose, our client asked us to create multilingual forms with fields that have two labels with different languages ​​for an input text(one right, another left :like this :
.
this pushed me to ask the question: is it possible to use two "local" at the same time? English on the left side, and Arabic on the right side?

strange question right ? but if you tell me it's Mission impossible and i'm not Tom Cruise !! I would be happy to forward the answer to my leader.

PS: all i can do now, is working with one and only one locale all over my application.

Thank you,
Jamal.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17995
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, unless you're Yog-Sothoth, you're probably located in only one locale at a time.

The first question to ask, is whether BOTH desired locales are variable, or is one of them (probably the Arabic one) going to remain constant? Or relatively constant, allowing for the fact that "Arabic" covers multiple sub-locales, just as English does.

If you're simply looking at locales for captioning text, probably the easiest way is to pull it from a supplied locale-specific backing bean. Which may be a session object fronting for a selectable resource bundle.

Of course. "locale" actually means more than that, so if you're also looking to support different currencies, number-formatting conventions, date/time representations and the like, it gets more complicated.
 
Ghazi Jamal
Greenhorn
Posts: 8
Hibernate Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Well, unless you're Yog-Sothoth, you're probably located in only one locale at a time.

The first question to ask, is whether BOTH desired locales are variable, or is one of them (probably the Arabic one) going to remain constant? Or relatively constant, allowing for the fact that "Arabic" covers multiple sub-locales, just as English does.

If you're simply looking at locales for captioning text, probably the easiest way is to pull it from a supplied locale-specific backing bean. Which may be a session object fronting for a selectable resource bundle.

Of course. "locale" actually means more than that, so if you're also looking to support different currencies, number-formatting conventions, date/time representations and the like, it gets more complicated.

i just had the information that one local (right side one) will remain constant. I could now see it as a second normal label..
but you are right, for formatting dates and currency, it would be a bit complicated, so how can we mix multiple formats for a field regardless of current locale?

Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic