How data translators work

 < Day Day Up > 

Dreamweaver handles all translator files the same way, regardless of whether they translate entire tags or only attributes. At startup, Dreamweaver reads all the files in the Configuration/Translators folder and calls the getTRanslatorInfo() function to obtain information about the translator. Dreamweaver ignores any file in which the getTRanslatorInfo() function does not exist or contains an error that causes it to be undefined.

NOTE

To prevent JavaScript errors from interfering with startup, errors in any translator file are reported only after all translators are loaded. For more information on debugging translators, see "Finding bugs in your translator" on page 442.


Dreamweaver also calls the TRanslateMarkup() function in all applicable translator files (as specified in the Translation preferences) whenever the user might add new content or change existing content that needs translation. Dreamweaver calls the TRanslateMarkup() function when the user performs one of the following actions:

  • Opens a file in Dreamweaver

  • Switches back to Design view after making changes in the HTML panel or in Code view

  • Changes the properties of an object in the current document

  • Inserts an object (using either the Objects panel or the Insert menu)

  • Refreshes the current document after making changes to it in another application

  • Applies a template to the document

  • Pastes or drags content into or within the Document window

  • Saves changes to a dependent file

  • Invokes a command, behavior, server behavior, Property inspector, or other extension that sets the innerHTML or outerHTML property of any tag object or the data property of any comment object

  • Selects File > Convert > 3.0 Browser Compatible

  • Selects Modify > Convert > Convert Tables to Layers

  • Selects Modify > Convert > Convert Layers to Tables

  • Changes a tag or attribute in the Quick Tag Editor and presses Tab or Enter

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net