Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

String and internationalization

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi
Does java.lang.String support internationalization fully. Which all functions doesnt support?
what are the issues i need to take care of when using string?
is it a good idea to use a wrapper for String class for internationalization.
Cherry
 
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "Does String support FULLY internationalization"?
Internationalization is supported through the use of ResourceBundles (see the tutorial on the site of Sun, or the javadoc). Depending on how your Locale is set, you will get Ja, Yes, Oui, Da ... on a call.
W.
[This message has been edited by Wilfried LAURENT (edited October 16, 2001).]
[This message has been edited by Wilfried LAURENT (edited October 16, 2001).]
 
Cherry Mathew
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By full support i asked abt the frunctions of String class
Thanx for the reply
Cherry
 
Wilfried LAURENT
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no method in the String class supporting internationalization, if you give to "internationalization" the standard meaning. Can you give an example or develop your idea?
W.
 
Cherry Mathew
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What if im passing a japaneese string to the compareTo function 2) using String tokenizer
etc
Thanx
regards
Cherry
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following ideas come from the following book:
Java Internationalization (O'Reilly March 2001) by Andrew Deitsch & David Czarnecky
You should not use the compareTo and equals method of the String class to compare "international" strings. Instead you should use the abstract class java.text.Collator.
First get an instance of the collator (here an instance of a collator for a french locale)

Then, use either collator.compare() or collator.equals() to compare two strings. Both methods take the two strings arguments and return an integer...
HIH

------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic