There's no nice syntax for that in VBA. If you really need to init an array of a user-defined type, you can use a couple of helper functions to do it like this:
Public Type settings
key As String
german As String
french As String
End Type
Private Function NewTranslation(key As String, german As String, french As String) As settings
NewTranslation.key = key
NewTranslation.german = german
NewTranslation.french = french
End Function
Private Sub AddTranslation(translations() As settings, value As settings)
Dim u As Integer
u = -1
On Error Resume Next ' ubound raises an error if the array is not dimensioned yet
u = UBound(translations)
On Error GoTo 0
ReDim Preserve translations(0 To u + 1) As settings
translations(u + 1) = value
End Sub
Public Sub Main()
Dim translations() As settings
AddTranslation translations, NewTranslation("send", "Senden", "Enregister")
AddTranslation translations, NewTranslation("directory", "Verzeichnis", "Liste")
' and so on
End Sub
A nicer way to do this particular problem would be a Collection (map) object using the language code and the original text as the key:
Private translations As New Collection
Public Sub Main()
With translations
.Add "Senden", "de:send"
.Add "Enregister", "fr:send"
.Add "Verzeichnis", "de:directory"
.Add "Liste", "fr:directory"
End With
MsgBox GetTranslation("de", "send")
End Sub
Public Function GetTranslation(language As String, s As String)
GetTranslation = s ' default to original text if no translation is available
On Error Resume Next
GetTranslation = translations(language + ":" + s)
End Function