RadRichTextBox is realy a very powerful control, except when comes to using Arabic language. However, I made many posts regarding this issue and came up with e result; where such problems regarding Arabic language may be managed later on in next releases.
Any way, I found a work around; where I captured keyboard messages and replaced numbers with their Arabic representations using the following function:
Public Shared Function TranslateNumerals(ByVal _char As Char) As String
If TranslationService.CurrentLocalizationInstance.CurrentLanguage = LanguageNames.Arabic Then
Dim enc As New System.Text.UTF8Encoding
Dim utf8Decoder As System.Text.Decoder
utf8Decoder = enc.GetDecoder
Dim sTranslated = New System.Text.StringBuilder
Dim cTransChar(1) As Char
Dim bytes() As Byte = {217, 160}
' Start Converting characters into Arabic mode.
If Char.IsDigit(_char) Then
bytes(1) = 160 + CInt(Char.GetNumericValue(_char))
utf8Decoder.GetChars(bytes, 0, 2, cTransChar, 0)
sTranslated.Append(cTransChar(0))
Else
sTranslated.Append(_char)
End If
TranslateNumerals = sTranslated.ToString
Else
TranslateNumerals = _char
End If
End Function
Where _char is an english number (e.g. 2,3,4,...) and the return string is the Arabic representation.
My question is: how to use such function to replace English numbers coming up from numbered lists, with their Arabic representation? I tried using ListLevelStyle but I could not find where lies the up coming numbers of the list.
Any help would be greatly appreciated .....
The attached image shows my requirement: