Determining What Kind Of Translator To Use - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

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 333.
Dreamweaver also calls the
lation preferences) whenever the user might add new content or change existing content that needs translation.
Dreamweaver calls the
translateMarkup()
• 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 Insert bar 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
property of any tag object or the
outerHTML
• Selects File > Convert > 3.0 Browser Compatible
• Selects Modify > Convert > Convert Tables To AP Divs
• Selects Modify > Convert > Convert AP Divs To Table
• Changes a tag or attribute in the Quick Tag Editor and presses Tab or Enter

Determining what kind of translator to use

All translators must contain the
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 328).
• To translate an entire tag (for example, a server-side include (SSI)) 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 trans-
lator 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 329).
function in all applicable translator files (as specified in the Trans-
translateMarkup()
function when the user performs one of the following actions:
property of any comment object
data
getTranslatorInfo()
and
translateMarkup()
DREAMWEAVER CS3
Extending Dreamweaver
innerHTML
functions, and they must reside
327
or

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents