Is there any possible way to change the language of a form with a button or checkbox. I have found and tried
But that no work.
Any Ideas ? :)
This may help you out: http://www.dotnetcurry.com/ShowArticle.aspx?ID=174&AspxAutoDetectCookieSupport=1. Apart from this, there are many other websites that tell you how to do this. If it doesn't help, don't hesitate to tell me so that I can further help you.
I kinda figured it out, I put it together like what the page tells you to do. And here it is
Private Sub comboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) If ComboBox1.SelectedItem.ToString() = "English" Then ChangeLanguage("en") ElseIf ComboBox1.SelectedItem.ToString() = "Spanish" Then ChangeLanguage("es-ES") Else ChangeLanguage("fr-FR") End If End Sub Private Sub ChangeLanguage(ByVal lang As String) For Each c As Control In Me.Controls Dim resources As ComponentResourceManager = New ComponentResourceManager(GetType(Form1)) resources.ApplyResources(c, c.Name, New CultureInfo(lang)) Next c End Sub
But when I use the combo box, nothing happens. Is there something I did wrong? and here is the top.
Imports System.Globalization Imports System.Threading Imports System.ComponentModel Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Items.Add("English") ComboBox1.Items.Add("Spanish") ComboBox1.Items.Add("French") ComboBox1.SelectedIndex = 0
The funny thing is I tried to do it myself but it didn't work for me either. I recommend you try this too (looks like it's going to work): http://www.vb-helper.com/howto_net_localize_at_runtime.html. Reply back if it doesn't work.
lol. okay thanks I Will check this out and see if it helps.