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