Determining what kind of translator to use

 < Day Day Up > 

All translators must contain the getTRanslatorInfo() and TRanslateMarkup() functions, and they must reside in the Configuration/Translators folder. They differ, however, in the kind of code that they insert into the user's document and in how that code must be inspected, as described in the following list:

  • To translate small pieces of server markup that determine attribute values or that conditionally add attributes to a standard HTML tag, write an attribute translator. Standard HTML tags that contain translated attributes can be inspected with the Property inspectors that are built into Dreamweaver. It is not necessary to write a custom Property inspector (see "Adding a translated attribute to a tag" on page 435).

  • To translate an entire tag (for example, a server-side include) or a block of code (for example, JavaScript, ColdFusion, PHP, or other scripting), write a block/tag translator. The code that is generated by a block/tag translator cannot be inspected with the Property inspectors that are built into Dreamweaver. You must write a custom Property inspector for the translated content if you want users to be able to change the properties of the original code (see "Locking translated tags or blocks of code" on page 437).

     < 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