BoTranSpecial is a Code template for doing any miscellaneous translating jobs you may find laying around<g>.

 

Example1, some add on browse header sort templates will change the browse back to default text when applied.  In this case you add the code template after the browse is sorted, and translate the browse.

 

Example 2, you add a 3rd party or other procedure that does not have "ABC translator" calls built in, then add the Translate Entire window code template to the procedure after the window is opened.

 

BTcodetpl

 

What to translate

 

1.Entire Window will translate all controls in the window including menu's and toolbar's.  Use this along with "disable in this procedure" checkbox in the BoTranExt template if you are manipulating prop:text, and strings and captions, and want to wait until they are all done to do the translation of the window.  CAUTION: If you let the BoTranExt Translate the window and use this selection, BoTran will add all kinds of "Translated Text " to the BTL file, because they do not appear in the default language field of the BTL file. (If you have that turned on in the Global Template)  Remember, BoTran always works with the "Default" text, and substitutes another language string when it exists.
2.Window Text(Caption) will just translate the Window text after you change it in an embed.  0{PROP:TEXT} = Translator.BTStr(0{PROP:TEXT})  If you conditionally change text in an embed and then use this code template, see example below, so BoTran has some default text to translate<g>
3.Single Control will just translate one control if you have Changed the text on it.

               Control = select the control to translate. 

4.Range of Controls Use this option if you or a 3rdParty template have created a range of controls at runtime that need translating.  Remember they need use variables(numbers) to be translated.

               Start From lowest created control

               End at highest created control(or higher, it is very forgiving<g>)

        Increment by +1 or -1 depending on Order.

 

Basic How it works: BoTran takes the "Default text" , or date format, or picture, for a control, ToolTip, Message, Browse Header, "whatever" and looks it up in a queue or file in the "default language" portion.  If a translation exists in the "chosen language", BoTran replaces the default string with the replacement string.  If BoTran does not find the "default text" in the queue or file,  BoTran will add it to the File and the queue (if you have that feature enabled).  This is why you should not "Translate" already "Translated" text, as it will start adding them all to the BTL file as Default Text strings.

 

BoTran always does a CLIP(LEFT('MyText')) so it ignores extra blank spaces.

BoTran is not Case sensitive, so File = file = fiLe = filE, etc.  

But   &File <> File <> File:  and all are separate entries in "default text"

 

When using BoTran always do conditional assignment of text this way, so we always have default text to translate.

This example shows hand code to translate the text calling the BTStr method.

 

IF MyVariable = 3

  ?MyButton{PROP:TEXT} = ' Doctor'

ELSE

?MyButton{PROP:TEXT} = ' Nurse'

END

?MyButton{PROP:TEXT} = Translator.BTStr(?MyButton{PROP:TEXT})