S
Screaming Eagles 101
This is not a question but something I found,
it might not be the best solution, but hey, it works...
Thought someone else could also use this, so here it is.
I made 2 resource files, one for Dutch settings, one for English settings
In these resource files I store the control's name as item, and the text
(caption) of the control as its value.
First I check the language and parse this to my subroutine
'Check Language
sLang =
System.Globalization.CultureInfo.CurrentCulture.ToString.ToUpper.Substring(0,
2)
'Then I loop through all the controls:
Private Sub Setlanguage(ByVal sLang As String)
Dim ctrl As Control
Dim rm As Resources.ResourceManager
If sLang = "NL" Then
rm = My.Resources.Nederlands.ResourceManager
Else
rm = My.Resources.English.ResourceManager
End If
For Each ctrl In Me.Controls
If Not IsNothing(rm.GetString(ctrl.Name)) Then
ctrl.Text = rm.GetString(ctrl.Name)
End If
Next
End Sub
It's as simple as this....
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
it might not be the best solution, but hey, it works...
Thought someone else could also use this, so here it is.
I made 2 resource files, one for Dutch settings, one for English settings
In these resource files I store the control's name as item, and the text
(caption) of the control as its value.
First I check the language and parse this to my subroutine
'Check Language
sLang =
System.Globalization.CultureInfo.CurrentCulture.ToString.ToUpper.Substring(0,
2)
'Then I loop through all the controls:
Private Sub Setlanguage(ByVal sLang As String)
Dim ctrl As Control
Dim rm As Resources.ResourceManager
If sLang = "NL" Then
rm = My.Resources.Nederlands.ResourceManager
Else
rm = My.Resources.English.ResourceManager
End If
For Each ctrl In Me.Controls
If Not IsNothing(rm.GetString(ctrl.Name)) Then
ctrl.Text = rm.GetString(ctrl.Name)
End If
Next
End Sub
It's as simple as this....
--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------