1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*3e02b54dSAndrew Rist<!--*********************************************************** 4*3e02b54dSAndrew Rist * 5*3e02b54dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 6*3e02b54dSAndrew Rist * or more contributor license agreements. See the NOTICE file 7*3e02b54dSAndrew Rist * distributed with this work for additional information 8*3e02b54dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 9*3e02b54dSAndrew Rist * to you under the Apache License, Version 2.0 (the 10*3e02b54dSAndrew Rist * "License"); you may not use this file except in compliance 11*3e02b54dSAndrew Rist * with the License. You may obtain a copy of the License at 12*3e02b54dSAndrew Rist * 13*3e02b54dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 14*3e02b54dSAndrew Rist * 15*3e02b54dSAndrew Rist * Unless required by applicable law or agreed to in writing, 16*3e02b54dSAndrew Rist * software distributed under the License is distributed on an 17*3e02b54dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18*3e02b54dSAndrew Rist * KIND, either express or implied. See the License for the 19*3e02b54dSAndrew Rist * specific language governing permissions and limitations 20*3e02b54dSAndrew Rist * under the License. 21*3e02b54dSAndrew Rist * 22*3e02b54dSAndrew Rist ***********************************************************--> 23cdf0e10cSrcweir<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit 24cdf0e10cSrcweir 25cdf0e10cSrcweir 26cdf0e10cSrcweirPublic Const cLANGUAGE_SYSTEM = "", cLANGUAGE_CHINESE = "zh", cLANGUAGE_DANISH = "da" 27cdf0e10cSrcweirPublic Const cLANGUAGE_DUTCH = "nl", cLANGUAGE_ENGLISH = "en", cLANGUAGE_FINNISH = "fi" 28cdf0e10cSrcweirPublic Const cLANGUAGE_FRENCH = "fr", cLANGUAGE_GERMAN = "de", cLANGUAGE_GREEK = "el" 29cdf0e10cSrcweirPublic Const cLANGUAGE_ITALIAN = "it", cLANGUAGE_JAPANESE = "ja", cLANGUAGE_NORWEGIAN = "no" 30cdf0e10cSrcweirPublic Const cLANGUAGE_POLISH = "pl", cLANGUAGE_PORTUGUESE = "pt", cLANGUAGE_RUSSIAN = "ru" 31cdf0e10cSrcweirPublic Const cLANGUAGE_SPANISH = "es", cLANGUAGE_SWEDISH = "sv", cLANGUAGE_TURKISH = "tr" 32cdf0e10cSrcweir 33cdf0e10cSrcweirPublic BLNameList(0 To 16) as String 34cdf0e10cSrcweir 35cdf0e10cSrcweir 36cdf0e10cSrcweir' R e s o u r c e s t r i n g c o n s t a n t s 37cdf0e10cSrcweir' ------------------------------------------------- 38cdf0e10cSrcweir' Dialog labels start at 1000 39cdf0e10cSrcweir 40cdf0e10cSrcweirSub LoadLanguage%(ByVal LangLocale) 41cdf0e10cSrcweirDim Dummy$ 42cdf0e10cSrcweirDim i as Integer 43cdf0e10cSrcweirConst dlgMonth = 1200 44cdf0e10cSrcweir' Abreviated months start 1225 45cdf0e10cSrcweirConst dlgShortMonth = 1225 46cdf0e10cSrcweir If InitResources("schedule", "cal") Then 47cdf0e10cSrcweir If LangLocale = cLANGUAGE_GERMAN Then 48cdf0e10cSrcweir 49cdf0e10cSrcweir ' Load all states 50cdf0e10cSrcweir BLNameList(0) = GetResText(1100) 51cdf0e10cSrcweir BLNameList(1) = "Bayern" 52cdf0e10cSrcweir BLNameList(2) = "Baden-Württemberg" 53cdf0e10cSrcweir BLNameList(3) = "Berlin" 54cdf0e10cSrcweir BLNameList(4) = "Bremen" 55cdf0e10cSrcweir BLNameList(5) = "Brandenburg" 56cdf0e10cSrcweir BLNameList(6) = "Hamburg" 57cdf0e10cSrcweir BLNameList(7) = "Hessen" 58cdf0e10cSrcweir BLNameList(8) = "Mecklenburg-Vorpommern" 59cdf0e10cSrcweir BLNameList(9) = "Niedersachsen" 60cdf0e10cSrcweir BLNameList(10) = "Nordrhein-Westfalen" 61cdf0e10cSrcweir BLNameList(11) = "Rheinland-Pfalz" 62cdf0e10cSrcweir BLNameList(12) = "Saarland" 63cdf0e10cSrcweir BLNameList(13) = "Sachsen" 64cdf0e10cSrcweir BLNameList(14) = "Sachsen-Anhalt" 65cdf0e10cSrcweir BLNameList(15) = "Schleswig Holstein" 66cdf0e10cSrcweir BLNameList(16) = "Thüringen" 67cdf0e10cSrcweir 68cdf0e10cSrcweir DlgCalModel.lstHolidays.StringItemList() = BLNameList() 69cdf0e10cSrcweir End If 70cdf0e10cSrcweir sWizardTitle$ = GetResText(1300) 71cdf0e10cSrcweir sError = GetResText(1301) 72cdf0e10cSrcweir cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302) 73cdf0e10cSrcweir cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303) 74cdf0e10cSrcweir DlgCalendar.Title = GetResText(1000) 75cdf0e10cSrcweir 76cdf0e10cSrcweir With DlgCalModel 77cdf0e10cSrcweir cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002) 78cdf0e10cSrcweir cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001) 79cdf0e10cSrcweir .hlnTime.Label = GetResText(1011) 80cdf0e10cSrcweir .lblYear.Label = GetResText(1012) 81cdf0e10cSrcweir .cmdCancel.Label = GetResText(1005) 82cdf0e10cSrcweir .cmdGoOn.Label = GetResText(1004) 83cdf0e10cSrcweir .lblHolidays.Label = GetResText(1014) 84cdf0e10cSrcweir sBitmapFilename = GetResText(1099) 85cdf0e10cSrcweir sBitmapFilename = ReplaceString(sBitmapFileName, ".gif", ".bmp") 86cdf0e10cSrcweir DlgCalModel.hlnCalendar.Label = GetResText(1006) 87cdf0e10cSrcweir .optYear.Label = GetResText(1007) 88cdf0e10cSrcweir .optMonth.Label = GetResText(1008) 89cdf0e10cSrcweir .lblMonth.Label = GetResText(1013) 90cdf0e10cSrcweir .cmdOwnData.Label = GetResText(1015) 91cdf0e10cSrcweir .hlnNewEvent.Label = GetResText(1019) 92cdf0e10cSrcweir .lblEvent.Label = GetResText(1019) 93cdf0e10cSrcweir .lblEventDay.Label = GetResText(1021) 94cdf0e10cSrcweir .lblEventMonth.Label = GetResText(1022) 95cdf0e10cSrcweir' .lblEventYear.Label = GetResText(1023) 96cdf0e10cSrcweir' .chkEventOnce.Label = GetResText(1020) 97cdf0e10cSrcweir .cmdInsert.Label = GetResText(1016) 98cdf0e10cSrcweir .cmdDelete.Label = GetResText(1017) 99cdf0e10cSrcweir ' Load long month names 100cdf0e10cSrcweir For i = 0 To 11 101cdf0e10cSrcweir cCalLongMonthNames(i) = GetResText(dlgMonth+i) 102cdf0e10cSrcweir cCalShortMonthNames(i)= cCalLongMonthNames(i) 103cdf0e10cSrcweir 'cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3) 104cdf0e10cSrcweir cCalShortMonthNames(i)= RTrim(cCalShortMonthNames(i)) 105cdf0e10cSrcweir Next 106cdf0e10cSrcweir ' Load sheet names 107cdf0e10cSrcweir sCalendarTitle = GetResText(1410) 108cdf0e10cSrcweir sMonthTitle = GetResText(1411) 109cdf0e10cSrcweir ' Load names of styles 110cdf0e10cSrcweir cCalStyleWorkday$ = GetResText(1400) 111cdf0e10cSrcweir cCalStyleWeekend$ = GetResText(1401) 112cdf0e10cSrcweir End With 113cdf0e10cSrcweir End If 114cdf0e10cSrcweirEnd Sub 115*3e02b54dSAndrew Rist</script:module> 116