I am trying to control whether digits get displayed as native digits on systems having an arabic culture.
To be precise, I try to avoid using native digits, because the display string contains a value that is identifying a radio access technology: 3G.
property provided by
namespace doesn't have any effect.
These are the values the property can take:
Context - The digit shape depends on the previous text in the same output. European digits follow Latin scripts; Arabic-Indic digits follow Arabic text; and Thai digits follow Thai text.
None - The digit shape is not changed. Full Unicode compatibility is maintained.
NativeNational - The digit shape is the native equivalent of the digits from 0 through 9. ASCII digits from 0 through 9 are replaced by equivalent native national digits.
The following example illustrates this:
CultureInfo ci = new CultureInfo("ar-EG");
ci.NumberFormat.DigitSubstitution = DigitShapes.None;
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
textBox1.Text = string.Format(arabicText, "3G");
Further, it behaves differently when system being used was not installed with an arabic display language, although the characters are available.
I would appreciate any help here.