do you think it's possible also to get the localized names of weekdays and months in a similar way? That would be useful as well.
On my system (German Windows XP Pro SP3 32bit), complete and abbreviated localized names of weekdays and months are contained in the file "C:\Windows\System32\ole2nls.dll".
Little John wrote:do you think it's possible also to get the localized names of weekdays and months in a similar way? That would be useful as well.
On my system (German Windows XP Pro SP3 32bit), complete and abbreviated localized names of weekdays and months are contained in the file "C:\Windows\System32\ole2nls.dll".
LoadLibraryEx_() fails probably because "ole2nls.dll" is a NE executable (16 bits).
;
; Get Localized Day Or Month Name
;
Procedure.s LocalizedDayName(DayOfWeek)
Protected DayName.s
DayName = Space(80)
GetLocaleInfo_(#LOCALE_USER_DEFAULT, #LOCALE_SDAYNAME1 + DayOfWeek - 1, @DayName, 80) ; LOCALE_SABBREVDAYNAME1 -> short name
ProcedureReturn DayName
EndProcedure
Procedure.s LocalizedMonthName(MonthOfYear)
Protected MonthName.s
MonthName = Space(80)
GetLocaleInfo_(#LOCALE_USER_DEFAULT, #LOCALE_SMONTHNAME1 + MonthOfYear - 1, @MonthName, 80) ; LOCALE_SABBREVMONTHNAME1 -> short name
ProcedureReturn MonthName
EndProcedure
For i = 1 To 7
Debug LocalizedDayName(i)
Next
Debug "--------"
For i = 1 To 12
Debug LocalizedMonthName(i)
Next
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).