L10n:Localizing Overview: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(moved CVS info to new page)
Line 32: Line 32:
**[http://www.mozilla.org/projects/thunderbird/ Thunderbird mail client]
**[http://www.mozilla.org/projects/thunderbird/ Thunderbird mail client]
**[http://www.mozilla.org/projects/calendar/| Sunbird & Calendar]
**[http://www.mozilla.org/projects/calendar/| Sunbird & Calendar]
*Alternatively (for Firefox, and soon, Thunderbird) you can use CVS to download the localizable parts, for either a branch or the current trunk.
*Alternatively (for Firefox, and soon, Thunderbird) you can use [[L10n:Localizing_Using_CVS|CVS to download the localizable parts]], for either a branch or the current trunk.
**See mozilla.org's [http://www.mozilla.org/cvs.html CVS primer], which explains the basics of checking out source code via CVS.
**If you're localizing on a branch, you'll need to know its [http://www.mozilla.org/releases/cvstags.html CVS tag]
***For example, the Firefox 1.0 release is on the <tt>AVIARY_1_0_20040515_BRANCH </tt> &#8211; however, new localizations for the 1.0.x release are no longer being accepted
**If you have a proper build environment set up (with GNU make &#8211; on win32, you probably need to use cygwin), add the following lines to your <tt>.mozconfig</tt>:
<pre class="code"> mk_add_options MOZ_CO_LOCALES="en-US ab-CD ab-CD"</pre>
and, if you have write access to the L10n repository,
<pre class="code"> mk_add_options LOCALES_CVSROOT=:ext:myusername%host.tld@cvs.mozilla.org:/l10n</pre>





Revision as of 10:13, 5 April 2005

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.

How to begin a localization

The following steps should give you an idea of how to localize Firefox, Thunderbird etc.

if you want to contribute your localizations back to the MLP, head over to the registration page. From there, you can check whether anyone is already producing localizations for your intended language, and either join them or register yourself for one of the projects.

...(tbc)

Links