-
this would be the basic approach I'd start with
[VBA]
Option Explicit
Public grxIRibbonUI As IRibbonUI
Public giLanguage As Long
Sub rxIRibbonUI_onLoad(ribbon As IRibbonUI)
Set grxIRibbonUI = ribbon
'doesn't have to be here
giLanguage = 1
End Sub
Sub rxshared_getLabel(control As IRibbonControl, ByRef returnedVal)
Select Case control.ID
Case "bOne"
Select Case giLanguage
Case 1
returnedVal = "Lable text 1 in Language 1"
Case 2
returnedVal = "Lable text 1 in Language 2"
Case 3
returnedVal = "Lable text 1 in Language 3"
Case 4
returnedVal = "Lable text 1 in Language 4"
End Select
Case "bTwo"
Select Case giLanguage
Case 1
returnedVal = "Lable text 2 in Language 1"
Case 2
returnedVal = "Lable text 2 in Language 2"
Case 3
returnedVal = "Lable text 3 in Language 3"
Case 4
returnedVal = "Lable text 4 in Language 4"
End Select
End Select
End Sub
[/VBA]
For a production use, I'd probably use collections or arrays to hold the strings and init that when the OnLoad calback fired
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules