Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Best way to implement multiple/editable languages in a web-app?

Reply
Thread Tools

Best way to implement multiple/editable languages in a web-app?

 
 
Dag Sunde
Guest
Posts: n/a
 
      12-16-2006
I'm in the design-phase of developing a "Web-App" with TomCat
on the serverside, and Firefox in kiosk-mode and a touch screen
on the client.

The complete app is going to be max 10-12 jsp-pages, where the
text-content is reasonably stable.

One of the requirements is that the language on the pages have
to be easy for the customer to extend to new languages. (The
user is presented with a choice between the available languages
in the first page).

What my customer want is to be able to add a new language file
in ie. "Klingon" in 6 months time, update the config file on the
server, and the next user that use the app, will now have Klingon
to select from too...

My idea is to give every element on every page a unique id. Then
create an xml or property file for each language. Then create a
getText(id) method somewhere that i use in each .JPS page on every
element.

Does anyone have some thougts on how to implement this in a clean
and extensible way?

Ideas? pointers? patterns?

TIA...

--
Dag.


 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      12-16-2006
Dag Sunde wrote:
> One of the requirements is that the language on the pages have
> to be easy for the customer to extend to new languages. (The
> user is presented with a choice between the available languages
> in the first page).


http://java.sun.com/j2se/1.5.0/docs/...rceBundle.html

> What my customer want is to be able to add a new language file
> in ie. "Klingon" in 6 months time, update the config file on the
> server, and the next user that use the app, will now have Klingon
> to select from too...


You would create a resource bundle for locale "tlh"
(<http://www.loc.gov/standards/iso639-2/php/English_list.php>).

- Lew
 
Reply With Quote
 
 
 
 
Dag Sunde
Guest
Posts: n/a
 
      12-16-2006
Lew wrote:
> Dag Sunde wrote:
>> One of the requirements is that the language on the pages have
>> to be easy for the customer to extend to new languages. (The
>> user is presented with a choice between the available languages
>> in the first page).

>
> http://java.sun.com/j2se/1.5.0/docs/...rceBundle.html
>


Thanks... Looks like a solution!

>> What my customer want is to be able to add a new language file
>> in ie. "Klingon" in 6 months time, update the config file on the
>> server, and the next user that use the app, will now have Klingon
>> to select from too...

>
> You would create a resource bundle for locale "tlh"
> (<http://www.loc.gov/standards/iso639-2/php/English_list.php>).
>


LOL!
There actually *is* an ISO code for Klingon?

--
Dag.


 
Reply With Quote
 
Daniel Pitts
Guest
Posts: n/a
 
      12-16-2006

Dag Sunde wrote:
> Lew wrote:
> > Dag Sunde wrote:
> >> One of the requirements is that the language on the pages have
> >> to be easy for the customer to extend to new languages. (The
> >> user is presented with a choice between the available languages
> >> in the first page).

> >
> > http://java.sun.com/j2se/1.5.0/docs/...rceBundle.html
> >

>
> Thanks... Looks like a solution!
>
> >> What my customer want is to be able to add a new language file
> >> in ie. "Klingon" in 6 months time, update the config file on the
> >> server, and the next user that use the app, will now have Klingon
> >> to select from too...

> >
> > You would create a resource bundle for locale "tlh"
> > (<http://www.loc.gov/standards/iso639-2/php/English_list.php>).
> >

>
> LOL!
> There actually *is* an ISO code for Klingon?
>
> --
> Dag.


Ofcourse! I think Google even has a Klingon locale version.

 
Reply With Quote
 
John W. Kennedy
Guest
Posts: n/a
 
      12-16-2006
Dag Sunde wrote:
> LOL!
> There actually *is* an ISO code for Klingon?


Only in the expanded 3-character system.

There are also codes for Esperanto, Volapük, Ido, Interlingua, and
Lojban, and there are dozens of natural languages listed that I never
heard of. (Though there is at least one natural language that I know of,
Tulu, that they don't list.)

--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      12-17-2006
> Dag Sunde wrote:
>> LOL!
>> There actually *is* an ISO code for Klingon?


John W. Kennedy wrote:
> Only in the expanded 3-character system.


Which apparently is supported in the Java locale mechanism. I have not tried
it myself, but the Sun Javadocs link right into ISO-639-2 documentation.

- Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the best way to implement a navigation David ASP .Net 1 06-03-2004 05:20 AM
Best way to support multiple languages in 3 tier app? Josh K. ASP .Net 0 08-25-2003 03:04 PM
what languages used to implement the UI in cellular/wireless phone? John Davis ASP .Net Mobile 0 08-22-2003 05:45 AM
Re: BEST WAY TO implement shopping basket Kevin Spencer ASP .Net 0 08-05-2003 04:23 PM
Re: Best way to implement ASP Session variables Steve C. Orr, MCSD ASP .Net 0 07-16-2003 09:09 PM



Advertisments