Share The I18N Multilingual Plug-In Solution And Vba Source Code

Hello, I am a CorelDRAW VBA GMS plugin developer from China. I would like to make your plugin bilingual in Chinese and English for international users. Before starting the development, I hope to receive your help and consent.

Private Sub UserForm_Initialize()
LNG_CODE = Val(GetSetting("LYVBA", "Settings", "I18N_LNG", "1033"))
Init_Translations Me, LNG_CODE
Me.Caption = i18n("Similar Selection Plus", LNG_CODE)
End Sub

Public Declare PtrSafe Function i18n Lib "C:\TSP\lyvba.dll" (ByVal str As String, ByVal code As Long) As String

Private Sub Test_i18n()
MsgBox i18n("Nodes", 2052)
MsgBox i18n("Nodes", 1033)
MsgBox i18n("Preset Property", 2052)
End Sub

Public Function Init_Translations(frm As UserForm, code As Long)
Dim ctl As Variant: Dim en As String
LNG_CODE = code

For Each ctl In frm.Controls
If TypeOf ctl Is MSForms.Label Or TypeOf ctl Is MSForms.CommandButton Or TypeOf ctl Is MSForms.ToggleButton Or TypeOf ctl Is MSForms.CheckBox Then
If Not IsNull(ctl.Caption) And ctl.Caption <> "" Then
en = ctl.Caption
ctl.Caption = i18n(en, LNG_CODE)
End If
If Not IsNull(ctl.ControlTipText) And ctl.ControlTipText <> "" Then
en = ctl.ControlTipText
ctl.ControlTipText = i18n(en, LNG_CODE)
End If
End If
Next ctl

End Function

Actual project demonstration effect

If you have a high-quality English VBA plug-in, you are willing to share it with everyone. You can leave your contact information or download address below this article