home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 April / PCWorld_2003-04_cd.bin / Software / Komercni / openoffice / f_0032 / Language.xba < prev    next >
Extensible Markup Language  |  2002-11-01  |  4KB  |  93 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. ' R e s o u r c e   s t r i n g   c o n s t a n t s
  16. ' -------------------------------------------------
  17. ' Dialog labels start at 1000
  18.  
  19. Sub LoadLanguage%(ByVal LangLocale)
  20. Dim Dummy$
  21. Dim i as Integer
  22. Const dlgMonth = 1200
  23. ' Abreviated months start 1225
  24. Const dlgShortMonth = 1225
  25.     If InitResources("schedule", "cal") Then
  26.         If LangLocale  = cLANGUAGE_GERMAN Then
  27.  
  28.             ' Load all states
  29.             BLNameList(0) = GetResText(1100)
  30.             BLNameList(1) = "Bayern"
  31.             BLNameList(2) = "Baden-W├╝rttemberg"
  32.             BLNameList(3) = "Berlin"
  33.             BLNameList(4) = "Bremen"
  34.             BLNameList(5) = "Brandenburg"
  35.             BLNameList(6) = "Hamburg"
  36.             BLNameList(7) = "Hessen"
  37.             BLNameList(8) = "Mecklenburg-Vorpommern"
  38.             BLNameList(9) = "Niedersachsen"
  39.             BLNameList(10) = "Nordrhein-Westfalen"
  40.             BLNameList(11) = "Rheinland-Pfalz"
  41.             BLNameList(12) = "Saarland"
  42.             BLNameList(13) = "Sachsen"
  43.             BLNameList(14) = "Sachsen-Anhalt"
  44.             BLNameList(15) = "Schleswig Holstein"
  45.             BLNameList(16) = "Th├╝ringen"
  46.  
  47.             DlgCalModel.lstHolidays.StringItemList() = BLNameList()
  48.         End If
  49.         sWizardTitle$ = GetResText(1300)
  50.         sError = GetResText(1301)
  51.         cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302)
  52.         cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303)
  53.         DlgCalendar.Title = GetResText(1000)
  54.  
  55.         With DlgCalModel
  56.             cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002)
  57.             cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001)
  58.             .hlnTime.Label = GetResText(1011)
  59.             .lblYear.Label = GetResText(1012)
  60.             .cmdCancel.Label = GetResText(1005)
  61.             .cmdGoOn.Label = GetResText(1004)
  62.             .lblHolidays.Label = GetResText(1014)
  63.             sBitmapFilename = GetResText(1099)
  64. '            sBitmapFilename = "china.bmp"
  65.             DlgCalModel.hlnCalendar.Label = GetResText(1006)
  66.             .optYear.Label = GetResText(1007)
  67.             .optMonth.Label = GetResText(1008)
  68.             .lblMonth.Label = GetResText(1013)
  69.             .cmdOwnData.Label = GetResText(1015)
  70.             .hlnNewEvent.Label = GetResText(1019)
  71.             .lblEvent.Label = GetResText(1019)
  72.             .lblEventDay.Label = GetResText(1021)
  73.             .lblEventMonth.Label = GetResText(1022)
  74.             .lblEventYear.Label = GetResText(1023)
  75.             .chkEventOnce.Label = GetResText(1020)
  76.             .cmdInsert.Label = GetResText(1016)
  77.             .cmdDelete.Label = GetResText(1017)
  78.             ' Load long month names
  79.             For i = 0 To 11
  80.                 cCalLongMonthNames(i) = GetResText(dlgMonth+i)
  81.                 cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3)
  82.                 cCalShortMonthNames(i)= RTrim(cCalShortMonthNames(i))
  83.             Next
  84.             ' Load sheet names
  85.             sCalendarTitle = GetResText(1410)
  86.             sMonthTitle = GetResText(1411)
  87.             ' Load names of styles
  88.             cCalStyleWorkday$ = GetResText(1400)
  89.             cCalStyleWeekend$ = GetResText(1401)
  90.         End With
  91.     End If
  92. End Sub
  93. </script:module>