| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"> |
| 5 | <meta name="Author" content="KaiRo - Robert Kaiser"> |
| 6 | <title>L10n talk - FOSDEM 2003 - Mozilla Meeting</title> |
| 7 | <link rel="stylesheet" type="text/css" href="l10ntalk.css"> |
| 8 | <link rel="contents" href="index.html" title="Contents"> |
| 9 | <link rel="index" href="l10ntalk_overview.html" title="Overview"> |
| 10 | <link rel="start" href="index.html" title="Start"> |
| 11 | <link rel="first" href="l10ntalk_01.html" title="First page"> |
| 12 | <link rel="previous" href="l10ntalk_02.html" title="Previous page"> |
| 13 | <link rel="next" href="l10ntalk_04.html" title="Next page"> |
| 14 | <link rel="last" href="l10ntalk_12.html" title="Last page"> |
| 15 | </head> |
| 16 | <body> |
| 17 | |
| 18 | <h1>adding a DTD file</h1> |
| 19 | |
| 20 | <div class="explanation"> |
| 21 | To be able to localize all that text, we need to declare general (text) <b>entities</b> for |
| 22 | all locale sensitive resources in an <b>external DTD</b> (Document Type Definition) subset and use an |
| 23 | <b>XML entity reference</b>, "<span class="hilite">&entity_name;</span>", to reference them. |
| 24 | <br>The DTD file is placed in an appropriate "locale" directory of our project. |
| 25 | </div> |
| 26 | |
| 27 | <div class="sample"> |
| 28 | <p class="sampledesc">Sample XUL: openLocation.xul</p> |
| 29 | <div class="samplecontent"> |
| 30 | <?xml version="1.0"?> |
| 31 | <br><!DOCTYPE dialog SYSTEM "chrome://communicator/<b>locale/openLocation.dtd</b>"> |
| 32 | <br><dialog ... title="<span class="hilite">&caption.label;</span>"> |
| 33 | <br>... |
| 34 | <br><description><span class="hilite">&enter.label;</span></description> |
| 35 | <br>... |
| 36 | <br></dialog> |
| 37 | </div> |
| 38 | </div> |
| 39 | |
| 40 | <div class="sample"> |
| 41 | <p class="sampledesc">Sample DTD: openLocation.dtd</p> |
| 42 | <div class="samplecontent"> |
| 43 | <!ENTITY <span class="hilite">caption.label</span> "Mozilla - Open Web Location"> |
| 44 | <br><!ENTITY <span class="hilite">enter.label</span> "Enter the web location (URL), or specify the local file you would like to open:"> |
| 45 | </div> |
| 46 | </div> |
| 47 | |
| 48 | </body> |
| 49 | </html> |