1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2*cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*cdf0e10cSrcweir<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit 4*cdf0e10cSrcweir 5*cdf0e10cSrcweir 6*cdf0e10cSrcweirPublic Const cLANGUAGE_SYSTEM = "", cLANGUAGE_CHINESE = "zh", cLANGUAGE_DANISH = "da" 7*cdf0e10cSrcweirPublic Const cLANGUAGE_DUTCH = "nl", cLANGUAGE_ENGLISH = "en", cLANGUAGE_FINNISH = "fi" 8*cdf0e10cSrcweirPublic Const cLANGUAGE_FRENCH = "fr", cLANGUAGE_GERMAN = "de", cLANGUAGE_GREEK = "el" 9*cdf0e10cSrcweirPublic Const cLANGUAGE_ITALIAN = "it", cLANGUAGE_JAPANESE = "ja", cLANGUAGE_NORWEGIAN = "no" 10*cdf0e10cSrcweirPublic Const cLANGUAGE_POLISH = "pl", cLANGUAGE_PORTUGUESE = "pt", cLANGUAGE_RUSSIAN = "ru" 11*cdf0e10cSrcweirPublic Const cLANGUAGE_SPANISH = "es", cLANGUAGE_SWEDISH = "sv", cLANGUAGE_TURKISH = "tr" 12*cdf0e10cSrcweir 13*cdf0e10cSrcweirPublic BLNameList(0 To 16) as String 14*cdf0e10cSrcweir 15*cdf0e10cSrcweir 16*cdf0e10cSrcweir' R e s o u r c e s t r i n g c o n s t a n t s 17*cdf0e10cSrcweir' ------------------------------------------------- 18*cdf0e10cSrcweir' Dialog labels start at 1000 19*cdf0e10cSrcweir 20*cdf0e10cSrcweirSub LoadLanguage%(ByVal LangLocale) 21*cdf0e10cSrcweirDim Dummy$ 22*cdf0e10cSrcweirDim i as Integer 23*cdf0e10cSrcweirConst dlgMonth = 1200 24*cdf0e10cSrcweir' Abreviated months start 1225 25*cdf0e10cSrcweirConst dlgShortMonth = 1225 26*cdf0e10cSrcweir If InitResources("schedule", "cal") Then 27*cdf0e10cSrcweir If LangLocale = cLANGUAGE_GERMAN Then 28*cdf0e10cSrcweir 29*cdf0e10cSrcweir ' Load all states 30*cdf0e10cSrcweir BLNameList(0) = GetResText(1100) 31*cdf0e10cSrcweir BLNameList(1) = "Bayern" 32*cdf0e10cSrcweir BLNameList(2) = "Baden-Württemberg" 33*cdf0e10cSrcweir BLNameList(3) = "Berlin" 34*cdf0e10cSrcweir BLNameList(4) = "Bremen" 35*cdf0e10cSrcweir BLNameList(5) = "Brandenburg" 36*cdf0e10cSrcweir BLNameList(6) = "Hamburg" 37*cdf0e10cSrcweir BLNameList(7) = "Hessen" 38*cdf0e10cSrcweir BLNameList(8) = "Mecklenburg-Vorpommern" 39*cdf0e10cSrcweir BLNameList(9) = "Niedersachsen" 40*cdf0e10cSrcweir BLNameList(10) = "Nordrhein-Westfalen" 41*cdf0e10cSrcweir BLNameList(11) = "Rheinland-Pfalz" 42*cdf0e10cSrcweir BLNameList(12) = "Saarland" 43*cdf0e10cSrcweir BLNameList(13) = "Sachsen" 44*cdf0e10cSrcweir BLNameList(14) = "Sachsen-Anhalt" 45*cdf0e10cSrcweir BLNameList(15) = "Schleswig Holstein" 46*cdf0e10cSrcweir BLNameList(16) = "Thüringen" 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir DlgCalModel.lstHolidays.StringItemList() = BLNameList() 49*cdf0e10cSrcweir End If 50*cdf0e10cSrcweir sWizardTitle$ = GetResText(1300) 51*cdf0e10cSrcweir sError = GetResText(1301) 52*cdf0e10cSrcweir cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302) 53*cdf0e10cSrcweir cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303) 54*cdf0e10cSrcweir DlgCalendar.Title = GetResText(1000) 55*cdf0e10cSrcweir 56*cdf0e10cSrcweir With DlgCalModel 57*cdf0e10cSrcweir cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002) 58*cdf0e10cSrcweir cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001) 59*cdf0e10cSrcweir .hlnTime.Label = GetResText(1011) 60*cdf0e10cSrcweir .lblYear.Label = GetResText(1012) 61*cdf0e10cSrcweir .cmdCancel.Label = GetResText(1005) 62*cdf0e10cSrcweir .cmdGoOn.Label = GetResText(1004) 63*cdf0e10cSrcweir .lblHolidays.Label = GetResText(1014) 64*cdf0e10cSrcweir sBitmapFilename = GetResText(1099) 65*cdf0e10cSrcweir sBitmapFilename = ReplaceString(sBitmapFileName, ".gif", ".bmp") 66*cdf0e10cSrcweir DlgCalModel.hlnCalendar.Label = GetResText(1006) 67*cdf0e10cSrcweir .optYear.Label = GetResText(1007) 68*cdf0e10cSrcweir .optMonth.Label = GetResText(1008) 69*cdf0e10cSrcweir .lblMonth.Label = GetResText(1013) 70*cdf0e10cSrcweir .cmdOwnData.Label = GetResText(1015) 71*cdf0e10cSrcweir .hlnNewEvent.Label = GetResText(1019) 72*cdf0e10cSrcweir .lblEvent.Label = GetResText(1019) 73*cdf0e10cSrcweir .lblEventDay.Label = GetResText(1021) 74*cdf0e10cSrcweir .lblEventMonth.Label = GetResText(1022) 75*cdf0e10cSrcweir' .lblEventYear.Label = GetResText(1023) 76*cdf0e10cSrcweir' .chkEventOnce.Label = GetResText(1020) 77*cdf0e10cSrcweir .cmdInsert.Label = GetResText(1016) 78*cdf0e10cSrcweir .cmdDelete.Label = GetResText(1017) 79*cdf0e10cSrcweir ' Load long month names 80*cdf0e10cSrcweir For i = 0 To 11 81*cdf0e10cSrcweir cCalLongMonthNames(i) = GetResText(dlgMonth+i) 82*cdf0e10cSrcweir cCalShortMonthNames(i)= cCalLongMonthNames(i) 83*cdf0e10cSrcweir 'cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3) 84*cdf0e10cSrcweir cCalShortMonthNames(i)= RTrim(cCalShortMonthNames(i)) 85*cdf0e10cSrcweir Next 86*cdf0e10cSrcweir ' Load sheet names 87*cdf0e10cSrcweir sCalendarTitle = GetResText(1410) 88*cdf0e10cSrcweir sMonthTitle = GetResText(1411) 89*cdf0e10cSrcweir ' Load names of styles 90*cdf0e10cSrcweir cCalStyleWorkday$ = GetResText(1400) 91*cdf0e10cSrcweir cCalStyleWeekend$ = GetResText(1401) 92*cdf0e10cSrcweir End With 93*cdf0e10cSrcweir End If 94*cdf0e10cSrcweirEnd Sub 95*cdf0e10cSrcweir</script:module>