'
' Example script for 2BrightSparks SyncBackPro V8 that shows how
' translation works.
'
' How to use this:
'
' - Copy the example.mo file to the \locale\FR\LC_MESSAGES\ 
'   folder in the SyncBackPro installation folder
'
' - Install the script and enable it as a main interface
'   script. Restart SyncBackPro.
'
' - Change the language (via the Preferences main menu) to
'   French
'
' - You'll see the column that was title "String 1" is now
'   title "Translated String 1"
'
' SBLang=Basic
'
' http://www.2BrightSparks.com/
'

'
' This is a main interface script
'
Function Description(ByRef ScriptType)
  Description = "Translation example"
  ScriptType = SCRIPTTYPE_MAIN
End Function

'
' Load our translations. Why do we not do this in MainStarted() ?
' Because the column titles are set before MainStarted is called.
'
' Just one column
'
Function MainColumnsCount
  SBSystem.AddTranslationDomain("example")
  MainColumnsCount = 1
End Function

'
' Column title. We can ignore Col because we only have
' one columm. Also ignore Width and just use the default.
'
Function MainColumnTitle(Col, ByRef Width)
  MainColumnTitle = SBSystem.TranslateString("example", "String 1")
End Function

'
' Column text. We can ignore Col because we only have
' one columm.
'
Function MainColumnText(Col, IsGroup, ProfileName)
  MainColumnText = SBSystem.TranslateString("example", "String 2")
End Function
