\\ 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.

XML Vocabulary

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="" xml:lang="en" lang="en"
 <head><title loc:id="100">Title</title></head>
  <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>

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 Working Group Note - Requirements for an internationalization/localizability tag set.
  • A Recommendation - Internationalization/localizability tag set.
  • A Working Group Note - Techniques for DTD/Schema internationalization and localizability specification.


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:

<script type="text/javascript" language="JavaScript">
//_span localise="no"

page_lang = parse_search();
is_locale_set ();
openIndex("site.txt", "pageorder", 0, 0, 1);

//_next localize="yes"
globvar_Title = "Site Map";