L10n:Localizing Overview: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(remove old links and langpack content, that's just confusing, link to the docs on mdc.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Breadcrumb: [[Main Page]] :: [[L10n:Home Page]] :: L10n:Localizing Overview
{{L10navbar}}<p><br>
__TOC__
__NOTOC__
= Overview =
= Overview =


Line 23: Line 23:
By altering the DTD file, you change the text displayed within the application.
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 [[mdc:Category:Localization|other documentation]].
You can find more information on how to [https://developer.mozilla.org/en/Localization_Quick_Start_Guide on MDN,] along with [https://developer.mozilla.org/en-US/docs/tag/Localization other documentation].


[[category:L10n]]
[[category:L10n]]

Latest revision as of 15:20, 9 October 2012

Mozilla L10n Main | Join Mozilla | Overview | L10n Drivers | Communities | Meetings | Blog | Resources


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 on MDN, along with other documentation.