L10n:Localizing Overview

From MozillaWiki
Revision as of 09:35, 16 May 2007 by AxelHecht (talk | contribs) (remove old links and langpack content, that's just confusing, link to the docs on mdc.)
Jump to navigation Jump to search

Breadcrumb: Main Page :: L10n:Home Page :: L10n:Localizing Overview

Overview

The object of localization is to translate an application's menus, dialogue boxes, labels and other settings (font, character encodings, dictionaries, default search engine etc) for a particular locale.

The Basics of Localization

The user interfaces (UIs) of Firefox, Thunderbird, the Mozilla Application Suite and Sunbird/Calendar are constructed using XML User Interface Language (XUL). This is an eXtensible Markup Language (XML) dialect and it allows the form (layout), function, content (language) and appearance (theme) of the UI to be described in separate files.

Such separation allows applications built with XUL to be localized relatively easily. All the text of the UI is held in DTD and Java-style .properties files. These text files link a token used in a XUL file to the actual string to be displayed. So, for example, the following XUL fragment is from am-main.xul:

<caption label="&<b class="token">identityTitle.label</b>;"/>
<description>&<b class="token">identityDesc.label</b>;</description>

and corresponds to the following fragment from am-main.dtd:

<!ENTITY <b class="token">identityTitle.label</b> "Identity">
<!ENTITY <b class="token">identityDesc.label</b> "Each account has an identity, which is the ↵
↳ information that other people see when they read your messages.">

where the "↵ ↳" indicates a single line, broken here for readability.

By altering the DTD file, you change the text displayed within the application.

You can find more information on how to mdc:Create_a_new_localization on MDC, along with other documentation.