a place for localization tools and technologies
|\\ Technologies :: Text Filtering :: Localization Directives|
A localization directive is special instruction included inside the source material that provides some specific information related to the localization of the file, a set of items, or a specific item in the file.
For example, a localization directive in a RC file would indicate string to not localize among a set of string that are normally translatable. Localization directives can be implemented in all formats that allow comments. In addition, with XML, you can even go farther and truly integrate the directives as part of the mark-up.
The same set of directives can be implemented as a distinct XML vocabulary in any XML document, through the use of namespaces. The same way, for instance, RDF offers a set of elements and attributes that can be used for content description, this internationalization tag set can provide an easy and common way of marking up any XML documents with localization directives.
For example, a localization directives could look like this in an XHTML file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:loc="urn:the-localization-directives-standard"> <head><title loc:id="100">Title</title></head> <body> <h1 id="101">Introduction to <loc:span term="yes">Document Management</loc:span></h1> <p id="102">Our company, <loc:span localize="no">Infinite Wisdom Inc.</loc:span>, provides quality courses on how to manage your documentation.</p> </body> </html>
Jan-07-2005: The Internationalization Tag Set Working Group (ITS) at the W3C has been formed to produce various documents pertaining to this topic:
A set of common localization directives is not only useful in XML, it can be also of a significant value for any format. It will be easy to adapt localization directives for encapsulation in comments, to be used in any for capable of handling comments. Comments-based directives have been already implemented in some formats, but not to its full possibilities, and only as proprietary features.
For example, such comments could be used in a script: