This is a migrated thread and some comments may be shown as answers.

Showdialog Bilingual Problem

4 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
meraj
Top achievements
Rank 1
meraj asked on 05 Mar 2011, 09:15 AM
Hi
I am working in bilingual form
      when i call a form as Showdialog then it cant be change as culture .
      Like when i want to see English in English culture and Arabic in Arabic culture.

4 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 05 Mar 2011, 11:12 AM
Hello Meraj,

What exactly is it you wish to localize? The Telerik controls have excellent localiztion support. If you go to the winforms help section and then under the control you wish to localize, have a look at the localization topic you will find how to do this.

The controls that can be localized do so by you providing a localization provider that you set on the form for the control in question
Hope this helps
Richard
0
meraj
Top achievements
Rank 1
answered on 05 Mar 2011, 12:39 PM
'show dailog code:

frmFrequencyPayment.DefInstance.Show()

'Culture Changing Code

System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo(CultureName)
System.Threading.Thread.CurrentThread.UiCulture  = New System.Globalization.CultureInfo(CultureName)

InitializeComponent()

System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(CalendarCulture)
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(CalendarCulture)

Dim df as new System.Globalization.DateTimeFormatInfo
df.ShortDatePattern = "dd/MM/yyyyy"

System.Threading.Thread.CurrentThread..CurrentCulture.DateTimeFormat = df




0
Richard Slade
Top achievements
Rank 2
answered on 05 Mar 2011, 12:52 PM
Hello Meraj,

If you can explain your issue in detail then I will be happy to try and help. If you need to add supporting screenshots or code using the Format Code block then this may also help
thanks
Richard
0
meraj
Top achievements
Rank 1
answered on 05 Mar 2011, 01:09 PM
1. frmDialog is used as a dialog box
Below Code Is used for Culture for form frmDialog

*Note -CultureName is a public variable which is either "en-US" or "ar-SA"

Public Sub New()
           System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo(CultureName)
           System.Threading.Thread.CurrentThread.UiCulture  = New System.Globalization.CultureInfo(CultureName)

            InitializeComponent()

End Sub

2.frmCustomer
Below code is called from frmCustomer after button click
Private Sub btnShowfrmDialog ( Byval sender as System.Object, Byval e as system.EventArgs) Handles btnCustomDepreciation.Click

frmCustomDepreciation.ShowDialog()

End Sub

problem is that when is use frmCustomDepreciation.Show() ,frmDialog  is working fine means
its showing in English when culture is " en-US" or   in Arabic when culture is "ar-SA"  .
But when i used frmCustomDepreciation.ShowDialog() ,frmDialog shows only default culture .
My Default culture is Arabic when i set the English culture, frmDialog not shows English.

Tags
General Discussions
Asked by
meraj
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
meraj
Top achievements
Rank 1
Share this question
or