localization of relaitve dates

B

bbembi_de

Hi,

I want to localize dates like:
"1st day" , "2nd day", "2 days before" ....

For example in german this would be:
"1. Tag", "2. Tag", vorgestern, ....

I have no idea how I can do this.

Please Help!

bye bembi
 
B

bbembi_de

Thanks for the reply so far.
But I didn't really find a solution.
Isn't there a way to just get the correct string with a int parameter.
Like: String getOrdinalNumber(int num, Locale loc);
result: 23rd, input: 23

I need this for several languages. Somebody must have had this problem
before!

bembi
 
G

GArlington

Hi,

I want to localize dates like:
"1st day" , "2nd day", "2 days before" ....

For example in german this would be:
"1. Tag", "2. Tag", vorgestern, ....

I have no idea how I can do this.

Please Help!

bye bembi

In nearly every Java IDE there is an option to "externalise
strings"...
It will create resource bundle - you can add different languages
yourself.
 
B

bbembi_de

Sure I can do this myself for every language.
I just have to know the ordinal numbers rule for every language and
implement it.
Well I would have expected that something like this would be allready
in the Java SDK class NumberFormat for instance.

Thanks for the input.

bembi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top