home *** CD-ROM | disk | FTP | other *** search
/ Kompuutteri Kaikille K-CD 2002 #3 / K-CD_2002-03.iso / OpenOffice / f_0031 / Language.xba < prev    next >
Extensible Markup Language  |  2001-08-24  |  5KB  |  106 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.  
  27.     If InitResources("schedule", "cal") Then
  28.         If LangLocale  = cLANGUAGE_GERMAN Then
  29.             DlgCalendar.GetControl("lblHolidays").Visible = True
  30.             DlgCalendar.GetControl("lstHolidays").Visible = True
  31.  
  32.             ' Load all states
  33.             BLNameList(0) = GetResText(1100)
  34.             BLNameList(1) = "Bayern"
  35.             BLNameList(2) = "Baden-W├╝rttemberg"
  36.             BLNameList(3) = "Berlin"
  37.             BLNameList(4) = "Bremen"
  38.             BLNameList(5) = "Brandenburg"
  39.             BLNameList(6) = "Hamburg"
  40.             BLNameList(7) = "Hessen"
  41.             BLNameList(8) = "Mecklenburg-Vorpommern"
  42.             BLNameList(9) = "Niedersachsen"
  43.             BLNameList(10) = "Nordrhein-Westfalen"
  44.             BLNameList(11) = "Rheinland-Pfalz"
  45.             BLNameList(12) = "Saarland"
  46.             BLNameList(13) = "Sachsen"
  47.             BLNameList(14) = "Sachsen-Anhalt"
  48.             BLNameList(15) = "Schleswig Holstein"
  49.             BLNameList(16) = "Th├╝ringen"
  50.  
  51.             DlgCalModel.lstHolidays.StringItemList() = BLNameList()
  52. '            Dim FirstItem as String
  53. '
  54. '            FirstItem = GetResText(1100)
  55. '            DlgCalModel.lstSpecBankholidays.AddItem(FirstItem)
  56. '            For i = 1 To Ubound(BLNameList())
  57. '                DlgCalModel.cmbState.AddItem(BLNameList(i))
  58. '            Next i 
  59.         Else 
  60. '            printdbgInfo DlgCalendar.GetControl("lblSpecBankholidays")
  61. '            DlgCalendar.GetControl("lblSpecBankholidays").Visible = False
  62. '            DlgCalendar.GetControl("lstSpecBankholidays").Visible = False
  63.         End If
  64.         sWizardTitle$ = GetResText(1300)
  65.         sError$ = GetResText(1301)
  66.         cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302)
  67.         cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303)
  68.         DlgCalendar.Title = GetResText(1000)
  69.  
  70.         With DlgCalModel
  71.             cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002)
  72.             cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001)
  73.             .hlnTime.Label = GetResText(1011)
  74.             .lblYear.Label = GetResText(1012)
  75.             .cmdCancel.Label = GetResText(1005)
  76.             .cmdGoOn.Label = GetResText(1004)
  77.             .lblHolidays.Label = GetResText(1014)
  78.             sBitmapFilename$ = GetResText(1099)
  79.             DlgCalModel.hlnCalendar.Label = GetResText(1006)
  80.             .optYear.Label = GetResText(1007)
  81.             .optMonth.Label = GetResText(1008)
  82.             .lblMonth.Label = GetResText(1013)
  83.             .cmdOwnData.Label = GetResText(1015)
  84.             .hlnNewEvent.Label = GetResText(1019)
  85.             .lblEvent.Label = GetResText(1019)
  86.             .lblEventDay.Label = GetResText(1021)
  87.             .lblEventMonth.Label = GetResText(1022)
  88.             .lblEventYear.Label = GetResText(1023)
  89.             .chkEventOnce.Label = GetResText(1020)
  90.             .cmdInsert.Label = GetResText(1016)
  91.             .cmdDelete.Label = GetResText(1017)
  92.             ' Load long month names
  93.             For i = 0 To 11
  94.                 cCalLongMonthNames(i) = GetResText(dlgMonth+i)
  95.                 cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3)
  96.             Next
  97.             ' Load sheet names
  98.             sCalendarTitle$ = GetResText(1410)
  99.             sMonthTitle$ = GetResText(1411)
  100.             ' Load names of styles
  101.             cCalStyleWorkday$ = GetResText(1400)
  102.             cCalStyleWeekend$ = GetResText(1401)
  103.         End With
  104.     End If
  105. End Sub
  106. </script:module>