home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 May / PCWorld_2004-05_cd.bin / akce / openoffice / f_0191 / Language.xba < prev    next >
Extensible Markup Language  |  2002-10-29  |  4KB  |  94 lines

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