I need to use labels, and also popups with text. This text needs to be translated in any language, and that's what I did, using a database reference of translations in various .resx files: any label/object has its ID, which I associate the translation, then with a combobox I select the languages that do the translation.
With the labels of the form that contains the combobox no issues, Since I'm using a SwitchCase that calls out translating functions:
Private Sub LangSelector_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LangSelector.SelectedIndexChanged
With LangSelector.Items
Select Case Me.LangSelector.SelectedIndex
Case Is = 0
SetItalian()
Case Is = 1
SetEnglish()
Case Is = 2
SetFrench()
Case Is = 3
SetSpanish()
Case Is = 4
SetItalian()
End Select
End With
End Sub
And translating functions...
Public Sub SetItalian()
OpacityLabel.Text = My.Resources._0_ITA_LangText_ScaffPanel.OpacityLabel
optIta.Text = My.Resources._0_ITA_LangText_ScaffPanel.optIta
optEng.Text = My.Resources._0_ITA_LangText_ScaffPanel.optEng
optEsp.Text = My.Resources._0_ITA_LangText_ScaffPanel.optEsp
LangSelector.TabIndex = 0(My.Resources._0_ITA_LangText_ScaffPanel.optIta)
End Sub
Those resx elements are tables with label/radio button's ID elements with associated text. With the elements where there is the combobox (UserControl) no issues. Problems are facing with the elements in another UserControl... How do I tell the elements are available to be translated?
And also, I don't know how to change text inside a popup, for the sake of translation (it's a tooltip).
How do I also change text in the combobox properly for the same translation purposes?