Support for other numbers than "english"...

  • Thread starter Thread starter Jochen Kalmbach
  • Start date Start date
J

Jochen Kalmbach

Hello,

we need to deliver or C# prduct to India...

But they do not have our numbers (0-9) instead they have some other
"symbols".

Is there any support from the int.ToString(CultureInfo) to support these
"numbers" !?

I tried the following, but only got the "english" numbers:

<code>
CultureInfo farsi = new CultureInfo("fa-IR");
int i = 12;
this.label1.Text = i.ToString(farsi);
</code>

I also changed in "Regional and Lagunage Options" the "Standard Digits"
to the correct "arabic" values, no change...


I also looked at:
Number Formatting
http://www.microsoft.com/globaldev/getwr/steps/wrg_nmbr.mspx

wich does not explain how to do this with .NET...

Does anybod know an solution !?

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Jochen Kalmbach said:
Hello,

we need to deliver or C# prduct to India...

But they do not have our numbers (0-9) instead they have some other
"symbols".

Is there any support from the int.ToString(CultureInfo) to support these
"numbers" !?

I tried the following, but only got the "english" numbers:

<code>
CultureInfo farsi = new CultureInfo("fa-IR");
int i = 12;
this.label1.Text = i.ToString(farsi);
</code>

I also changed in "Regional and Lagunage Options" the "Standard Digits"
to the correct "arabic" values, no change...


I also looked at:
Number Formatting
http://www.microsoft.com/globaldev/getwr/steps/wrg_nmbr.mspx

wich does not explain how to do this with .NET...

Does anybod know an solution !?

And I always thought they were called "arabic digits"...

What language version of windows did you test that on? I'd guess you either
need an indian Windows version, or install a multi-language pack.

Niki
 
Hello Niki,
What language version of windows did you test that on? I'd guess you
either need an indian Windows version, or install a multi-language
pack.

No, you need only XP...

You can change the number-digits in "Customize Regional Options" in
"Regional and Language Options". Select "Farsi" and then change "Standard-
Digits" to "xsnbvsjbvskvbj" (cannot write these numbers).

But the problem is, it DOES not affect .NETs´ ToString!!!

The only solution is to change the "preferences" to "Farsi" but this will
change ALL numbers in ALL cultures!!!


So the problem is:
How can I display arabic (or japanese) numbers in the apropriate culture
(Farsi or Japan) ?
The number-format of other cultures should not be changed!


--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Hi,

I am researching the issue and I will update you with new information ASAP.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi,

Here is my researching result.
There is not currently a way in the .NET Framework to do the job.

To do the job, in addition to changing to the locale(e.g. Arabic(Egypt)),We
also need to change the Digit Substitution as below.
-> Regional Settings Control Panel applet
-> Tab Number
-> Digit Substitution (combo)
-> Swap between National and Context

Based on my test when I change the Digit Substitution to National, the
digital will be painted as the Arabic digital glyph.
So far there is no programmatical method to do the all job above.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi,

thanx for your investigation...
There is not currently a way in the .NET Framework to do the job.

To do the job, in addition to changing to the locale(e.g.
Arabic(Egypt)),We also need to change the Digit Substitution as below.
-> Regional Settings Control Panel applet
-> Tab Number
-> Digit Substitution (combo)
-> Swap between National and Context

Based on my test when I change the Digit Substitution to National, the
digital will be painted as the Arabic digital glyph.

This only works if you also set the default to the culture, where you
changed the "Digit substition".
If the default culture has the normal digits it does not work.
And if the substitution is enabled, it is done for ALL cultures.

So far there is no programmatical method to do the all job above.

Will there be support for this in an future relase (.NET2)?

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
Hi

So far the whidbey is not final released, so far the beta version framework
did not implement the feature while I think you may try to submit a wish to
out mswish website.

Microsoft offers several ways for you to send comments or suggestions about
Microsoft products. If you have suggestions for product enhancements that
you would like to see in future versions of Microsoft products, please
contact us using one of the methods listed later in this article.

Let us know how we can improve our products.

Product Enhancement suggestions can include:

" Improvements on existing products.
" Suggestions for additional features.
" Ways to make products easier to use.

World Wide Web - To send a comment or suggestion via the Web, use one of
the following methods:

" In Internet Explorer 6, click Send Feedback on the Help menu and then
click the link in the Product Suggestion section of the page that appears.
" In Windows XP, click Help and Support on the Start menu. Click Send your
feedback to Microsoft, and then fill out the Product Suggestion page that
appears.
" Visit the following Microsoft Web site: http://www.microsoft.com/ms.htm
" Click Microsoft.com Guide in the upper-right corner of the page and then
click Contact Us . Click the link in the Product Suggestion section of the
page that appears.
" Visit the following Microsoft Product Feedback Web site:
"http://register.microsoft.com/mswish/suggestion.asp" and then complete and
submit the form.

E-mail - To send comments or suggestions via e-mail, use the following
Microsoft Wish Program e-mail address, (e-mail address removed).
FAX - To send comments or suggestions via FAX, use the following Microsoft
FAX number, (425) 936-7329.

Each product suggestion is read by a member of our product feedback team,
classified for easy access, and routed to the product or service team to
drive Microsoft product and/or service improvements. Because we receive an
abundance of suggestions (over 69,000 suggestions a year!) we can't
guarantee that each request makes it into a final product or service. But
we can tell you that each suggestion has been received and is being
reviewed by the team that is most capable of addressing it.

All product or service suggestions received become the sole property of
Microsoft. Should a suggestion be implemented, Microsoft is under no
obligation to provide compensation.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top