Function RussianMonthFunction(month)
Select MonthFunction(month)
Case "January"
RussianMonthFunction = "Январь"
' ... и т.д.
End Select
End Function
'Localized Month Name
Function GetLocalMonthName(Date, ByVal Locale As String) As String
'Locale =
' rus - Russian
' eng - English
Locale = LCase$(Locale)
Select Case Month(Date)
Case 1
GetLocalMonthName = Decode(Locale, "rus","Январь", "eng","January", "###")
Case 2
GetLocalMonthName = Decode(Locale, "rus","Февраль", "eng","February", "###")
...
End Month
End Function
Function Decode(ByVal Value As Variant, ParamArray Pairs() As Variant) As Variant
Dim N As Long, I As Long
N = UBound(Pairs) - LBound(Pairs) + 1
N = N Mod 2
If N = 1 Then Decode = Pairs(UBound(Pairs))
For I = LBound(Pairs) To UBound(Pairs) - N Step 2
If Value = Pairs(I) Then
Decode = Pairs(I + 1)
Exit Function
End If
Next I
End Function
Сейчас этот форум просматривают: SemrushBot, Yandex-бот и гости: 2