Data translators translate specialized markup—server-side includes, conditional JavaScript
statements, or other code such as PHP3, JSP, CFML, or ASP—into code that Macromedia
Dreamweaver MX 2004 can read and display. In Dreamweaver, you can translate attributes
within tags as well as entire tags or blocks of code. All data translators—block/tag or attribute—
are HTML files.
Translated tags or blocks of code must be enclosed in locked regions to preserve the original
markup. Translated attributes do not require locks, which makes it simple to inspect the tags that
contain them.
Data translation—especially for entire tags or blocks of code—might involve complex operations
that either cannot be done with JavaScript or that can be done more efficiently using C. If you are
familiar with C or C++, you should also read
How data translators work
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
translator. Dreamweaver ignores any file in which the
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
Dreamweaver also calls the
specified in the Translation preferences) whenever the user might add new or changed existing
content that needs translation. Dreamweaver calls 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
"C-Level Extensibility" on page
getTranslatorInfo()
352.
translateMarkup()
CHAPTER 20
Data Translators
function to obtain information about the
getTranslatorInfo()
function in all applicable translator files (as
translateMarkup()
353.
function does not
function when the
335
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?