• Post Reply Bookmark Topic Watch Topic
  • New Topic

Variant parameter in Locale settings  RSS feed

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Here I see this java tutorial and at the very bottom of the webpage it explains how to set the variant field.
They provide this link with a list of the all variants available. However I could not find the variant they are using in the example snippet they utilize.
Which is the following:



The output of the program is :

th: 573.34
th_TH: 573.34
th_TH_TH_#u-nu-thai: ๕๗๓.๓๔

In the line I am interested in(*), i see that in order to declare the "variant" they used the TH acronym for thailand. However I cannot find this variant in the link that they provided and I above mentioned and I am mentioning it again here link .
Moreover what is the result: #u-nu-thai? the subtag? What does it mean exactly?
Thanks in advance.

 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The variant is in there way at the bottom.

%%
Type: region
Subtag: TH
Description: Thailand
Added: 2005-10-16
%%


As for the output following the underscore after the variant, that is a Unicode locale/language extension. More info on that and variants can be found in the Javadoc of the Locale class.
 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jelle Klap wrote:The variant is in there way at the bottom.

%%
Type: region
Subtag: TH
Description: Thailand
Added: 2005-10-16
%%


As for the output following the underscore after the variant, that is a Unicode locale/language extension. More info on that and variants can be found in the Javadoc of the Locale class.


As you can see in what you quoted "Type: Region" it's not a variant. in the code they are using it as a variant (which change arabic number to thai numbers).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!