Search completed in 1.48 seconds.
SVN for Localizers
welcome to the svn tutorial for
localizers!
... brief intro to svn svn (abbreviation for subversion) is a free and open source repository tool we use to manage the
localized mozilla web pages.
... svn client: this is what a
localizer installs on their own computer.
...And 6 more matches
Mozilla Content Localized in Your Language
you are free to add, edit, remove, and
localize everything in this section according to how the localization team for your language agrees.
...
localizers can assume that source content reaches 2/3 of the total available line space.
nsIPrefLocalizedString
modules/libpref/public/nsipref
localizedstring.idlscriptable this interface is simply a wrapper interface for nsisupportsstring so the preferences service can have a unique identifier to distinguish between requests for normal wide strings nsisupportsstring) and '
localized' wide strings, which get their default values from properites files.
Creating localizable web applications
an important step of developing a web application or creating web content is making sure that it can be
localized.
... document your code so that
localizers know what they're translating (e.g.
... simplify
localized versions if necessary oftentimes, it is better to slightly simplify the
localized version of your web application than to serve a mix of
localized and english content.
...And 19 more matches
Localization content best practices
note: if you're a
localizer and you want to contribute to the localization of mozilla products, you might want to read our localization quick start guide for information on localizing mozilla code.
... note on
localizers mozilla
localizers are volunteers with very diverse technical skills: some of them rely exclusively on translation tools, others prefer to work directly with text editors and don't have problems working with vcs systems.
... add localization notes
localizers usually work on the localizable files without the context of the source files including the
localized strings; it is important to add comments to the localizable files themselves, too.
...And 18 more matches
Localization - Archive of obsolete content
localized strings translated strings are kept in a directory called "locale" under your main add-on directory, one file for each locale.
... the files: use the .properties format are named "xx-yy.properties", where "xx-yy" is the name of the locale in question contain one entry for each string you want to
localize, consisting of an identifier for the string and its translation in that locale, in the format identifier=translation need to use utf-8 without bom encoding lines starting with "#" (after optional whitespace) are comments suppose your add-on contains a single localizable string, represented in english as "hello!", and you want to supply us english and french french localizations.
... using
localized strings in html this example uses the action button api, which is only available from firefox 29 onwards.
...And 15 more matches
Index
it allows mozilla
localizers to easily check their work.
...this page is to help explain how to
localize these strings so that the correct plural form is shown to the user.
... 10 localization notes guide, internationalization, localization, mozilla
localizers usually work on the localizable files without the context of the source files including the
localized strings; it is important to add comments to the localizable files themselves, too.
...And 14 more matches
Translation phase
as a reward for your efforts, you get to move on to the very reason you've come here: to
localize mozilla projects.
...at mozilla, we
localize many different projects that can be categorized into three different groups.
...the l10n tools are meant to help you maintain your
localized content from release to release and leverage already
localized materials when localizing new content.
...And 11 more matches
Localization formats
there are 4 main approaches to web l10n with regards to the choice of technology used for localization logic: html/php .lang gettext (.po) wiki (tbd) the choice of the filetype depends on a couple of factors: how much content is there to be
localized?
...you may choose to present just the html for localization: we give an html file which lists several pieces of content like, <h1>getting started</h1> and the
localizer translates to <h1>débuter avec firefox</h1> the
localizer then submits the translated html or php back to us by either checking in changes to svn or sending us a patch that pascal checks in.
... advantages to html good for small projects very simple for web developers gives
localizers the exact context of translations a
localizer who knows basic html can style translations to make sure translations display correctly...we can allow slight modifications (e.g.
...And 11 more matches
Localization and Plurals
this page is to help explain how to
localize these strings so that the correct plural form is shown to the user.
...you may also need to
localize the initial strings for your code, so it would be good to read through at least the usage section as well.
...this plural rule is used to determine how many plural forms are needed for each word that needs to be
localized, with plurals in mind.
...And 9 more matches
The Essentials of an Extension - Archive of obsolete content
a
localized description and name can be added with the following code: <em:
localized> <description> <em:locale>es-es</em:locale> <em:name>xul school hola mundo</em:name> <em:description>bienvenido a xul school!</em:description> </description> </em:
localized> the es-es locale string indicates that this is the spanish (es) localization for spain (es).
... you can add as many <em:
localized> sections as you need.
...this is a special element that allows us to obtain
localized strings dynamically, by only providing a "key" that identifies the string.
...And 8 more matches
Localizing extension descriptions
all of the different descriptions now appear in the install.rdf file using em:
localized properties.
...the following example demonstrates this (most normal manifest properties have been removed for brevity): <?xml version="1.0"?> <rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>tabsidebar@blueprintit.co.uk</em:id> <em:
localized> <description> <em:locale>de-de</em:locale> <em:name>tab sidebar</em:name> <em:description>zeigt in einer sidebar vorschaubilder der inhalte aller offenen tabs an.</em:description> </description> </em:
localized> <em:
localized> <description> <em:locale>es-es</em:locale> <em:name>tab sidebar</em:name> <em:description>muestra...
... una vista previa de sus pestañas en su panel lateral.</em:description> </description> </em:
localized> <em:
localized> <description> <em:locale>nl-nl</em:locale> <em:name>tab sidebar</em:name> <em:description>laat voorbeeldweergaven van uw tabbladen in de zijbalk zien.</em:description> </description> </em:
localized> <em:name>tab sidebar</em:name> <em:description>displays previews of your tabs in your sidebar.</em:description> </description> </rdf> all of the metadata mentioned below can be
localized in this way.
...And 8 more matches
Localizing without a specialized tool
from the create a new localization document, an interested
localizer can follow a technical step-by-step process that starts the localization process by focusing on how to
localize two of the primary types of localization files (dtd and properties) used in the mozilla source code.
... with that document, users can see immediately two
localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
... repeating the process allows a
localizer to create a testable package to see his or her work as they progress to a final version.
...And 7 more matches
IAccessibleAction
method overview [propget] hresult description([in] long actionindex, [out] bstr description ); hresult doaction([in] long actionindex ); [propget] hresult keybinding([in] long actionindex, [in] long nmaxbindings, [out, size_is(,nmaxbindings), length_is(, nbindings)] bstr keybindings, [out] long nbindings ); [propget] hresult
localizedname([in] long actionindex, [out] bstr
localizedname ); hresult nactions([out,retval] long nactions ); [propget] hresult name([in] long actionindex, [out] bstr name ); methods description() returns a description of the specified action of the object.
...description the returned value is a
localized string of the specified action.
...the returned strings are the
localized human readable key sequences to be used to activate each action, e.g.
...And 6 more matches
Application Translation with Mercurial
in this example, we assume firefox for desktop shall be
localized and that the localization branch is aurora.
...other
localizers will likely have done changes to the translation, either adding new texts, removing obsolete ones or improving the current texts.
... microsoft's terminology search allows fast lookups of
localized technical terms.
...And 5 more matches
Localizing with Pontoon
at mozilla, we use pontoon to
localize all mozilla products and websites, ranging from firefox to mozilla.org.
...here we'll discuss how to use pontoon to
localize projects, from first sign-in to finalizing your contributions.
...only the toolbar on top belongs to pontoon, containing the following items (from left to right): list of strings opens a sidebar with a list of all strings to
localize.
...And 4 more matches
Localization Use Cases
in all presented examples, we try to show the existing code, explain the problem from the
localizers' or developers' perspective, and suggest a solution.
... solution in l20n, the
localizer can define the gender (or, in fact, any arbitrary trait) as an attribute of the entity.
...this takes the responsibility away from the developers and puts it in the hands of
localizers, at the same time transforming it from a burden into an opportunity.
...And 4 more matches
L20n
through l20n, mozilla is creating a new generation of technology that places more power in
localizers' hands.
... l20n lets
localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic.
... for
localizers documentation for
localizers creating
localized content for a project that uses l20n.
...And 4 more matches
IAccessible2
([in] long maxextendedstates, [out, size_is(,maxextendedstates), length_is(, nextendedstates)] bstr extendedstates, [out] long nextendedstates ); [propget] hresult groupposition([out] long grouplevel, [out] long similaritemsingroup, [out] long positioningroup ); [propget] hresult indexinparent([out] long indexinparent ); [propget] hresult locale([out] ia2locale locale ); [propget] hresult
localizedextendedrole([out] bstr
localizedextendedrole ); [propget] hresult
localizedextendedstates([in] long max
localizedextendedstates, [out, size_is(,max
localizedextendedstates), length_is(, n
localizedextendedstates)] bstr
localizedextendedstates, [out] long n
localizedextendedstates ); [propget] hresult nextendedstates([out] long nextendedstates ); [propget] hresult nrelations([out] long nrelatio...
...
localizedextendedrole() returns the
localized extended role.
... [propget] hresult
localizedextendedrole( [out] bstr
localizedextendedrole ); parameters
localizedextendedrole return value s_false if there is nothing to return, [out] value is null.
...And 4 more matches
l10n - Archive of obsolete content
localize strings appearing in the add-on's javascript code.
... note that you can't currently use
localize strings appearing in content scripts or html files, but you can share the
localized strings you want by assigning it's values to a json serializable object.
... globals functions get(identifier, count, placeholder1...n) this function takes a string parameter which it uses as an identifier to look up and return a
localized string in the locale currently set for firefox.
...And 3 more matches
Preferences - Archive of obsolete content
nsipref
localizedstring almost the same as nsisupportsstring, but it is handled differently in getcomplexvalue() when there's no user value for the given preference; see below for details.
...erence.with.non.ascii.value", components.interfaces.nsisupportsstring).data; // example 2: setting unicode value var str = components.classes["@mozilla.org/supports-string;1"] .createinstance(components.interfaces.nsisupportsstring); str.data = "some non-ascii text"; prefs.setcomplexvalue("preference.with.non.ascii.value", components.interfaces.nsisupportsstring, str); nsipref
localizedstring another complex type supported by mozilla is nsipref
localizedstring.
...you should do the following: add this line to some .properties file (for all of your locales), say to chrome://myext/locale/defaults.properties: extensions.myext.welcomemessage=
localized default value add the default value for extensions.myext.welcomemessage, pointing to that properties file, by adding the following line to your file with default preferences (see below).
...And 3 more matches
Localizing an extension - Archive of obsolete content
performing a few simple steps makes your extension much easier to
localize into various languages without having to edit the xul or javascript files themselves.
...localizing strings in javascript code if your javascript code contains literal strings that need to be
localized, as does our stock watcher sample, we need to make those localizable as well.
...this involves rewriting the refreshinformation() function to load the strings, and its enclosed inforeceived() function to use the loaded,
localized, strings instead of string literals.
...And 3 more matches
XUL Coding Style Guidelines - Archive of obsolete content
making xul localizable -- mandatory in the past, ui (display) related resource descriptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be
localized for a specific language or culture.
... localization notes localization notes are the xul writers' notes to the
localizers/translators.
... they are placed above the actual entity string in the format: <!-- localization note (entity.name): content --> where the <var>entity.name</var> is the entity name (id) for the string (entity value) to be
localized, and the content provides helpful hints to the
localizers.
...And 3 more matches
Bootstrapping a new locale
l10n documentation has moved to https://mozilla-l10n.github.io/
localizer-documentation/ .
... hg allows
localizers to work locally on their machines and then "push" changes to their official mozilla repository.
...perties sanitize.dtd credits.dtd search.properties enginemanager.dtd searchbar.dtd enginemanager.properties setdesktopbackground.dtd feeds shellservice.properties history sidebar migration tabbrowser.dtd openlocation.dtd tabbrowser.properties openlocation.properties as a
localizer, you are responsible for localizing each of the ".dtd" and ".properties" in *all* of the sub-directories found in your ab-cd directory.
...And 3 more matches
Localization technical reviews
this ensures that every user who downloads your
localized mozilla application receives all of your hard work in a functional product.
...
localizers can specify the team responsible for the work by listing the name just after the moz_langpack_creator.
...it is best to look into each of these files to see if the
localizer's strings might be too long.
...And 3 more matches
Creating localizable web content
depending on context, find alternate strings or document an explanation of the string for
localizers check that we don't link in new pages to sub-pages with anchors.
... per-locale customizations check if there are alternative links for
localized pages (e.g., links to mdn, addons.mozilla.org, or other external resources, are there translated equivalents we can use).
...sometimes you can leave some freedom of modification for a block of text so that the
localizers link to relevant local resources.
...And 3 more matches
Writing localizable code
about
localizers a few notes about
localizers for developers who rarely deal with them:
localizers like tools, and they don't like editors, localization tools are often based on key-value pairs, at least some
localizers have their talents focused on language skills and are not savvy in programming, or even building applications.
...if you change the semantics of a
localized string, change the key.
...there are few exceptions to this rule, but in general, the
localized file should comply with standards and should not require build tools to be transformed.
...And 3 more matches
Index
some examples are: 169 iaccessiblerelation interfaces, needscontent, xpcom, xpcom interface reference returns a
localized version of the relation type.
... 253 defaultkeybinding provides
localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
... 264 getactiondescription this method retrieves the description (
localized name) of the accessible action at the given zero-based index.
...And 3 more matches
Accesskey display rules - Archive of obsolete content
however, in some locales, e.g., japanese
localized build, its most ui labels don't have alphabets but alphabets are used to accesskey.
... for coherence of the labels on such
localized builds, the accesskey text is always appended even if the labels have their accesskey characters.
... e.g., when an accesskey of "ok" is 'o' and an accesskey of "キャンセル" (means "cancel") is 'c', the labels will be "ok(o)" and "キャンセル(c)" on japanese
localized build.
...And 2 more matches
Creating a Language Pack
please consult the documentation on
localized builds on firefox-source-docs.
... creating a langpack we will now merge the
localized files from x-testing locale with the en-us files from the original source.
... while in that directory, issue the following command: $ make merge-x-testing locale_mergedir=$(pwd)/mergedir x-testing: browser chrome browser aboutcerterror.dtd // add and
localize this file ...
...And 2 more matches
Localization sign-off reviews
this ensures that every user who downloads your
localized mozilla application receives all of your hard work in a functional product.
... sign-off review criteria since the scope of each qa review process varies, the criteria used to evaluate a
localizer's work also varies.
...hence, unless a
localizer makes a change within the new revision that nullifies the approved work in the previous revision, the sign-off criteria will be significantly less comprehensive than a technical review.
...And 2 more matches
L20n Javascript API
alternatively, you can register callbacks to execute when the context is ready (or when globals change and translations need to be updated) with ctx.
localize.
... ctx.
localize(['hello', 'new'], function(l10n) { var node = document.queryselector('[data-l10n-id=hello]'); node.textcontent = l10n.entities.hello.value; node.classlist.remove('hidden'); }); ctx.registerlocales(defaultlocale: string?, availablelocales: array<string>?) register the default locale of the context instance, as well as all other locales available to the context instance before the language negotiation.
... ctx.
localize(ids: array<string>, callback: function) registers a callback which fires when all entities listed in ids have been retrieved.
...And 2 more matches
preferences/service - Archive of obsolete content
example: var name = "extensions.checkcompatibility.nightly"; require("sdk/preferences/service").reset(name); get
localized(name, defaultvalue) gets the
localized value for an application preference name.
... returns string :
localized preference value, returns a default value if no preference is set.
...so that prefs.get returns the properties file url whereas prefs.get
localized returns the value defined in the properties file.
... example: var prefs = require("sdk/preferences/service"); var name = "general.useragent.locale"; prefs.get(name); // is equal to "chrome://global/locale/intl.properties" prefs.get
localized(name) // is equal to "en-us" set
localized(name, value) sets the
localized application preference name to value.
Install Manifests - Archive of obsolete content
localized allows you to
localize the add-on's name, description, contributors and other metadata.
... the
localized description must specify at least one em:locale which indicates which locales to use this information for.
... <em:
localized> <description> <em:locale>de-de</em:locale> <em:name>tab sidebar</em:name> <em:description>zeigt in einer sidebar vorschaubilder der inhalte aller offenen tabs an.</em:description> </description> </em:
localized> the following properties which are described elsewhere in this page can be included in the
localized property: name description creator homepageurl developer translator contributor more documentation can be found at localizing extension descriptions.
... <em:optionstype>3</em:optionstype> <em:optionsurl>chrome://myaddon/content/options.html</em:optionsurl> this section here contains an example of
localized html page as an option panel in a new tab: bootstrapped extensions :: localization (l10n) (example linked to is: github :: l10n-html-options).
Index - Archive of obsolete content
47 l10n add-on sdk
localize strings appearing in the add-on's javascript code.
...these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or
localized for various markets.
... 1911 stringbundle xul elements, xul reference an element which can be used to load
localized resources from property files.
...performing a few simple steps makes your extension much easier to
localize into various languages without having to edit the xul or javascript files themselves.
Introduction to XUL - Archive of obsolete content
that is, a separate file of
localized strings.
...a xul file can be made
localizeable very easily by substituting entities for any content which may change as the locale changes.
... the
localized text must be defined in a separate dtd or dtd fragment.
...mozilla will make that decision automatically if the
localized xml file specifies its dtd using a chrome url, as outlined in xul localizability issues.
Bootstrapped extensions - Archive of obsolete content
js and jsm files - using property files to
localize your .js and .jsm files you have to use property files.
... xul and html files - using entities from dtd files many times html pages are used, however they cannot be
localized with dtd files.
...here is an example showing how to use a
localized html page as an options page: github :: l10n-html-options.
Date.prototype.toLocaleFormat() - Archive of obsolete content
names for months and days of the week are
localized using the operating system's locale.
...you should take care that the format string is
localized properly according to the user's system settings.
...note that the format string in this example is not properly
localized, which will result in the problems described above.
CustomizableUI.jsm
array getwidgetsinarea(aareaid); string getareatype(aareaid); domelement getcustomizetargetforarea(aareaid, awindow); void reset(); void undoreset(); void removeextratoolbar(); object getplacementofwidget(awidgetid); bool iswidgetremovable(awidgetnodeorwidgetid); bool canwidgetmovetoarea(awidgetid); void get
localizedproperty(awidget, aprop, aformatargs, adef); void hidepanelfornode(anode); bool isspecialwidget(awidgetid); void addpanelcloselisteners(apanel); void removepanelcloselisteners(apanel); void onwidgetdrag(awidgetid, aarea); void notifystartcustomizing(awindow); void notifyendcustomizing(awindow); void dispatchtoolboxevent(aeven...
... get
localizedproperty() get a
localized property off a (widget) object.
... parameters awidget the object whose property we should use to fetch a localizable string aprop the property on the object to use for the fetching aformatargs (optional) any extra arguments to use for a formatted string adef (optional) the default to return if we don't find the string in the stringbundle return value the
localized string, or adef if the string isn't in the bundle.
Initial setup
hg (mercurial) mercurial is the revision control environment that houses the main mozilla source code as well as
localized code for each official mozilla localization.
...the svn for
localizers guide will help you learn the most important svn commands for l10n.
... hg (mercurial) as noted above, we use mercurial for maintaining mozilla source code and
localized code.
L20n HTML Bindings
the l20n html bindings you can take advantage of html bindings to
localize your html documents with l20n.
... when all dom nodes are
localized, the document element will fire a document
localized event, which you can listen to: document.addeventlistener('document
localized', function() { // the dom has been
localized and the user sees it in their language yourapp.init(); }); exposing context data you can expose important bits of data to the localization context in form of context data.
... <script type="application/l10n-data+json"> { "newnotifications": 3, "user": { "name": "jane", "gender": "feminine" } } </script> this data will be available context-wide to all
localized strings.
nsIAccessible
layout oriented methods nsiaccessible.getchildatpoint() to get child accessible from point nsiaccessible.getaccessibletoleft(), nsiaccessible.getaccessibletoright(), nsiaccessible.getaccessibleabove() or nsiaccessible.getaccessiblebelow() to get left, right, top or below placed accessible methods getkeybindings provides array of
localized string of global keyboard accelerator for the given action index supported by accessible.
... keyboardshortcut provides
localized string of accesskey name, such as alt+d.
... defaultkeybinding provides
localized string of global keyboard accelerator for default action, such as ctrl+o for open file.
The Box Model - Archive of obsolete content
it is important to know how it works in order to make interfaces that are easy to
localize, skin and use in different types of operating systems, screen sizes and resolutions.
...you always have to keep in mind that
localized strings may be significantly longer in other languages, specially much longer than english strings.
Search Extension Tutorial (Draft) - Archive of obsolete content
function setpref(name, value,
localized) { // if this is a
localized preference, transform the value into an // appropriate data: url.
... if (
localized) value = "data:text/plain," + encodeuricomponent(name + "=" + value.replace(/ /g, "\\u0020")); // save the original and new values.
Repackaging Firefox - Archive of obsolete content
locale/*/partner.properties for preferences which need to be
localized, there needs to be an entry in each of the properties files with the desired value for that locale.
...there are two kinds of preferences in firefox, both set in the partner.js file: localizable preferences, which have a value of a chrome:// uri pointing to the properties file where firefox can fetch the
localized value from.
Index - Archive of obsolete content
these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or
localized for various markets.
... 1180 stringbundle xul elements, xul reference an element which can be used to load
localized resources from property files.
The Joy of XUL - Archive of obsolete content
these applications are easily customized with alternative text, graphics, and layout so they can be readily branded or
localized for various markets.
...further, the application can be
localized for different languages and regions independently of its logic or presentation.
Localization - Archive of obsolete content
inside these archives, you will find the files that hold the
localized text for each window.
... « previousnext » see also how to
localize html pages, xul files, and js/jsm files from bootstrapped add-ons: bootstrapped extensions :: localization (l10n) ...
Using multiple DTDs - Archive of obsolete content
normally you have a single dtd (document type definition) to
localize a specific xul file.
... but there are situations where you want to use multiple dtds, for example to
localize common widgets used in all your xul files, additionally to the ones specific to the file.
stringbundle - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an element which can be used to load
localized resources from property files.
... the "src" attribute accepts only absolute chrome:// urls (see bugs 133698, 26291) attributes src properties applocale , src, stringbundle, strings methods getformattedstring, getstring examples (example needed) attributes src type: uri the uri of the property file that contains the
localized strings.
omni.ja (formerly omni.jar)
/chrome/ user interface files for the application /chrome/
localized.manifest manifest of
localized content; referenced by the main chrome manifest file.
... /chrome/non
localized.manifest manifest of non-
localized content; referenced by the main chrome manifest file.
Accessible Toolkit Checklist
the "of" will be parsed out by the assistive technology, so don't
localize it.
...the "l" and "of" will be parsed out by the assistive technology, so don't
localize it.
Gecko Keypress Event
problem 2 the access keys for the menu items are specified with the
localized characters on some
localized builds.
... these
localized access keys work fine with the keyboard layout of the locale.
L10n Checks
it allows mozilla
localizers to easily check their work.
...that gives
localizers an idea on how thorough the localization is.
Localization notes
localizers usually work on the localizable files without the context of the source files including the
localized strings; it is important to add comments to the localizable files themselves, too.
...there are a number of automated tools that parse these comments for easier access and use by
localizers.
Localizing with Koala
la-1.9.2 3.6 requesting all changes adding changesets adding manifests adding file changes added 33099 changesets with 158636 changes to 50664 files (+9 heads) updating working directory 40357 files updated, 0 files merged, 0 files removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the
localized files or leave empty for now check "mercurial" if you wish to use mercurial to keep the revision history of your files (very recommended) existing localizations: url: if you're editing an existing localization or you already have a repository set up (either on hg.mozilla.org or bitbucket), type the url of the remote repository, e.g.
... comparing and translating now that we have set up koala to
localize firefox from en-us into x-testing, we can start translating the localization files.
Localization quick start guide
along the way, you'll learn about the variety of projects you can contribute to and the tools used to
localize them.
... when we get to specific examples, we'll take them from the firefox project, as it is the most widely
localized project within mozilla.
Uplifting a localization from Central to Aurora
localizers who are working on l10n-central are responsible for getting their work onto the aurora repository.
...that's gonna conflict, and you need to resolve that with your merge tool so that the resulting
localized file doesn't have the string any more.
Setting up the infrastructure
this is useful when a
localizer submits a new version of the messages.po file.
...this way the
localizers will be able to preview their changes almost in real-time.
Web Localizability
you will make
localizer's life easier, for which they will be grateful.
... you will have quality content,
localized and adapted to the needs of the local market.
gettext
the string definition in the messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the
localizer's target language and its rules for creating plural forms, there might be another field for translation, e.g.
...for instance, "log in" as a button label might be translated by a
localizer as the imperative, but for a dialog title, the
localizer may choose to use a different form, like gerund (much like "logging in").
compare-locales
compare-locales is a python script that helps
localizers to check their work without running firefox or another application.
...that gives
localizers an idea on how thorough the localization is.
Mozilla Projects
compare-locales compare-locales is a python script that helps
localizers to check their work without running firefox or another application.
... l20n l20n lets
localizers reach higher levels of free linguistic expression by sharpening the divide between localization and application logic.
IAccessibleImage
method overview [propget] hresult description([out] bstr description ); [propget] hresult imageposition([in] enum ia2coordinatetype coordinatetype, [out] long x, [out] long y ); [propget] hresult imagesize([out] long height, [out] long width ); methods description() returns the
localized description of the image.
... [propget] hresult description( [out] bstr description ); parameters description the
localized description of the image.
IAccessibleRelation
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) method overview [propget] hresult
localizedrelationtype([out] bstr
localizedrelationtype ); [propget] hresult ntargets([out] long ntargets ); [propget] hresult relationtype([out] bstr relationtype ); [propget] hresult target([in] long targetindex, [out] iunknown target ); [propget] hresult targets([in] long maxtargets, [out, size_is(maxtargets), length_is( ntargets)] iunknown targets, [out] long ntargets ); methods
localizedrelationtype() returns a
localized version of the relation type.
... [propget] hresult
localizedrelationtype( [out] bstr
localizedrelationtype ); parameters
localizedrelationtype return value s_ok.
GetKeyBindings
« nsiaccessible page summary this method provides array of
localized string of global keyboard accelerator for the given action index supported by accessible.
...return values returns array of
localized string of global keyboard accelerator.
nsIMsgAccountManagerExtension
a panel consists of a xul file with a page element as root element and the property file containing the
localized name.
...it has to be unique and defines the file name of the property file and the xul page as well as the name of the
localized string contained in the property file.
nsIMsgFilterCustomAction
this should be
localized.
... * @param actionfolder folder in the filter list * @param filtertype filter type (manual, offlinemail, etc.) * * @return errormessage a
localized message to display if invalid * set to null if the actionvalue is valid */ autf8string validateactionvalue(in autf8string actionvalue, in nsimsgfolder actionfolder, in nsmsgfiltertypetype filtertype); /* allow duplicate actions in the same filter list?
Component; nsIPrefBranch
interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of getstringpref) nsipref
localizedstring (
localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object into which to the complex preference value should be retrieved.
...interfaces currently supported are: nsilocalfile nsisupportsstring (unichar) (removed as of gecko 58 in favor of setstringpref) nsipref
localizedstring (
localized unichar) nsifilespec (deprecated - to be removed eventually) avalue the xpcom object from which to set the complex preference value.
nsIStringBundleService
intl/strres/nsistringbundle.idlscriptable provides the string bundle service, which provides a way to fetch
localized strings from a property file.
... see also code snippets : miscellaneous : using string bundles from javascript how to
localize html pages, xul files, and js/jsm files from bootstrapped add-ons.
translate - HTML: Hypertext Markup Language
the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is
localized, or whether to leave them unchanged.
... it can have the following values: empty string or "yes", which indicates that the element should be translated when the page is
localized.
SVG: Scalable Vector Graphics
compared to classic bitmapped image formats such as jpeg or png, svg-format vector images can be rendered at any size without loss of quality and can be easily
localized by updating the text within them, without the need of a graphical editor to do so.
... with proper libraries, svg files can even be
localized on-the-fly.
Miscellaneous - Archive of obsolete content
these properties can be accessed from javascript in the following manner: var common = { _bundle: components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .createbundle("chrome://myext/locale/myext.properties"), get
localizedmessage: function(msg) { return this._bundle.getstringfromname(msg); } }; alert(common.get
localizedmessage("invalid.url")) another similar alternative (using both getstringfromname and formatstringfromname), is: var fcbundle = components.classes["@mozilla.org/intl/stringbundle;1"] .getservice(components.interfaces.nsistringbundleservice) .
List of Mozilla-Based Applications - Archive of obsolete content
tool built on xulrunner mongodb database project uses spidermonkey moyura email client part of the khmeros linux distro mozcards, jolistopwatch, jolitimer simple apps for maemo uses xulrunner moznet .net control embeddable gecko for .net applications wraps xulrunner for use in .net applications my internet browser
localized browser uses gecko myna application server javascript application server for java uses mozilla rhino nextcms (fr) cms nightingale music player community run effort to continue songbird support for linux olpc web browser browser oneteam jabber client opendocument viewer viewer opengate's tool...
New Skin Notes - Archive of obsolete content
thanks again --mmondor future fixes in l10n versions there all heading links are wrong - main link and documentation leads to english devmo, and devnews and webwatch should be hidden or
localized too.
Using nsIXULAppInfo - Archive of obsolete content
} see nsiversioncomparator for details example 2: dealing with nightlies var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); if(appinfo.appbuildid >= "2005093006") { // running on a build after 2005093006 } you shouldn't rely on build ids for releases, as build id might be different for custom build or a
localized version of an application.
2006-10-06 - Archive of obsolete content
cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that
localizers can get a head-start on the localization before the final version is made available.
2006-10-20 - Archive of obsolete content
he can be contacted via: email: preed@mozilla.com irc: preed on irc.mozilla.org phone: 650.903.0800 x256 uploading language packs to amo on october 17th benjamin smedberg brought the following to the attention of the
localizers and the build team: that he is planning to upload the firefox 2 language packages currently located at http://releases.mozilla.org/pub/mozi...rc3/win32/xpi/ to addons.mozilla.org in the next few days.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.i18n - feb 2nd - sep 22nd, 2006 announcements testing a dummy greek bon echo nsis installer bug #69230: accelerators should not be affected by keyboard group/level proposal of code changes for l10n in firefox 3 discussions thai language support: how can we add thai as an official
localized build?
2006-11-24 - Archive of obsolete content
approval queue for fx 2.0.0.1 closing closing the approval queue for firefox 2.0.0.1 discussions quality of
localized builds and process requirements quality of
localized builds and process requirements the translate toolkit mdnto po: its current state and how to use it discussion on clarifications on translate toolkit to avoid confusion.
E4X for templating - Archive of obsolete content
return s.replace(/"/g, '"').replace(/'/g, '''); } if (typeof s === 'xml') { return s.tostring().replace(/"/g, '"').replace(/'/g, '''); } return string(s).replace(/"/g, '"').replace(/'/g, '''); } localization e4x works nicely with a simple utility for localizing strings of a properties file: // localization function $s(msg, args){ //get
localized message var strs = cc['@mozilla.org/intl/stringbundle;1'].getservice(ci.nsistringbundleservice).
Archive of obsolete content
performing a few simple steps makes your extension much easier to
localize into various languages without having to edit the xul or javascript files themselves.
Chrome registration
locale localizable applications keep all their
localized information in locale providers.
Creating a spell check dictionary add-on
/www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <description about="urn:mozilla:install-manifest"> <em:id>locale-code@dictionaries.addons.mozilla.org</em:id> <em:version>version number</em:version> <em:type>64</em:type> <em:unpack>true</em:unpack> <em:name>name</em:name> <!-- other install.rdf metadata such as em:
localized, em:description, em:creator, em:developer, em:translator, em:contributor or em:homepageurl --> <!-- firefox --> <em:targetapplication> <description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minversion>18.0a1</em:minversion> <em:maxversion>46.0</em:maxversion> </description> </em:targetapplication> <!-- ...
AddonType
name string the
localized name for the type.
JavaScript code modules
pluralform.jsm supplies an easy way to get the correct plural forms for the current locale, as well as ways to
localize to a specific plural rule.
L10n testing with xcode
select the client project in the left pane and choose editor > import localizations from the toolbar and select your
localized xliff file.
Localizing with Mercurial
mercurial allows
localizers to work locally (on their machines) and then push (an hg term) changes to a remote repository, which usually is hosted on the mozilla servers (hg.mozilla.org).
QA phase
before a team becomes official, we like to get the
localizers comfortable with the hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository.
Self-hosted builtins in SpiderMonkey
throwtypeerror, throwrangeerror, throwsyntaxerror, which self-hosted code should use instead of throw so that the error message is specified in js.msg and can be
localized.
SpiderMonkey Internals
these messages can be
localized at compile time by replacing the .msg file; or, with a little modification to the source, at run time.
DefaultKeyBinding
« nsiaccessible page summary provides
localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
GetActionDescription
« nsiaccessible page summary this method retrieves the description (
localized name) of the accessible action at the given zero-based index.
KeyboardShortcut
« nsiaccessible page summary provides
localized string of accesskey name, such as alt+d (alt + d).
nsIBrowserHistory
you can also pass in the
localized "(local files)" title given to you by a history query to remove all history information for local files.
nsIContentSniffer
let charset = "iso-8859-1"; try { // this pref has been removed, see bug 910192 charset = services.prefs.getcomplexvalue("intl.charset.default", ci.nsipref
localizedstring).data; } catch (e) { } let conv = cc["@mozilla.org/intl/scriptableunicodeconverter"] .createinstance(ci.nsiscriptableunicodeconverter); conv.charset = charset; try { let str = conv.convertfrombytearray(adata, alength); if (str.substring(0, 5) == "%pdf-") return "application/pdf"; // we...
nsIDOMFontFace
attribute type description cssfamilyname domstring a family name that could be used in css font-family (not necessarily the actual name that was used, due to aliases, generics,
localized names, and so on).
nsIProgressEventSink
astatusarg status code argument to be used with the string bundle service to convert the status message into
localized, human readable text.
nsIUpdate
billboardurl astring the url to a page that is typically
localized to display in the update prompt.
XPCOM Interface Reference
vhistoryresulttreeviewernsinavhistoryresultviewobservernsinavhistoryresultviewernsinavhistoryservicensinavhistoryvisitresultnodensinetworklinkservicensiobservernsiobserverservicensioutputstreamnsioutputstreamcallbacknsiparentalcontrolsservicensiparserutilsnsipasswordnsipasswordmanagernsipermissionnsipermissionmanagernsipipensiplacesimportexportservicensiplacesviewnsipluginhostnsiprefbranch2nsipref
localizedstringnsiprefservicensiprincipalnsiprinterenumeratornsiprintingpromptnsiprivatebrowsingservicensiprocessnsiprocess2nsiprocessscriptloadernsiprofilensiprofilelocknsiprofileunlockernsiprogramminglanguagensiprogresseventsinknsipromptnsipromptservicensipropertiesnsipropertynsipropertybagnsipropertybag2nsipropertyelementnsiprotocolhandlernsiprotocolproxycallbacknsiprotocolproxyfilternsiprotocolproxyse...
XPCOM Interface Reference by grouping
eventsink nsihttpchannel nsihttpchannelinternal nsihttpheadervisitor nsiidnservice nsiprotocolhandler nsiprotocolproxycallback nsiprotocolproxyfilter nsiprotocolproxyservice nsiproxyinfo preferences nsiiniparser nsiiniparserfactory nsiprefbranch nsiprefbranch2 nsipref
localizedstring nsiprefservice nsistringbundle nsistringbundleservice security cookies nsicookie nsicookie2 nsicookieacceptdialog nsicookieconsent nsicookiemanager nsicookiemanager2 nsicookiepermission nsicookiepromptservice n...
Thunderbird Binaries
latest english trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ latest
localized trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central-l10n/ note: please use http://ftp.stage.mozaws.net/pub/thunderbird/nightly/latest-comm-central/ because the above two links currently do not work.
WebIDL bindings
each new tag requires that a
localized string be defined, containing the deprecation message to display.
Mozilla
creating a
localized windows installer of seamonkey preamble: not all of the programs listed below are necessary.
FileList - Web APIs
tml> <head> </head> <body> <!--multiple is set to allow multiple files to be selected--> <input id="myfiles" multiple type="file"> </body> <script> var pullfiles=function(){ // love the query selector var fileinput = document.queryselector("#myfiles"); var files = fileinput.files; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { //
localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </script> </html> specifications specification status comment file apithe definition of 'filelist' in that specification.
HTMLButtonElement - Web APIs
htmlbuttonelement.validationmessage read only is a domstring representing the
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLFieldSetElement - Web APIs
htmlfieldsetelement.validationmessage a domstring representing a
localized message that describes the validation constraints that the element does not satisfy (if any).
HTMLInputElement - Web APIs
validationmessage read only string: returns a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLKeygenElement - Web APIs
validationmessage read only is a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLObjectElement.validationMessage - Web APIs
the validationmessage read-only property of the htmlobjectelement interface returns a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLObjectElement - Web APIs
htmlobjectelement.validationmessage read only returns a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLOutputElement - Web APIs
htmloutputelement.validationmessageread only a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLSelectElement - Web APIs
htmlselectelement.validationmessageread only a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLTextAreaElement - Web APIs
validationmessage read only string: returns a
localized message that describes the validation constraints that the control does not satisfy (if any).
Index - Web APIs
1852 htmlobjectelement.validationmessage api, html dom, htmlobjectelement, needsexample, property, reference, validationmessage the validationmessage read-only property of the htmlobjectelement interface returns a domstring representing a
localized message that describes the validation constraints that the control does not satisfy (if any).
Writing WebSocket servers - Web APIs
extensions are optional and generalized (like compression); subprotocols are mandatory and
localized (like ones for chat and for mmorpg games).
Developer guides
this guide covers the algorithm in general and how it applies to content you create—especially when you build properly
localized and internationalized content.
Global attributes - HTML: Hypertext Markup Language
translate an enumerated attribute that is used to specify whether an element's attribute values and the values of its text node children are to be translated when the page is
localized, or whether to leave them unchanged.
HTML documentation index - HTML: Hypertext Markup Language
33 translate experimental, global attributes, html, reference the translate global attribute is an enumerated attribute that is used to specify whether an element's translateable attribute values and its text node children should be translated when the page is
localized, or whether to leave them unchanged.
Array - JavaScript
array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
BigInt64Array - JavaScript
bigint64array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
BigUint64Array - JavaScript
biguint64array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Date.prototype.toLocaleDateString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaledatestringsupportslocales() { try { new date().tolocaledatestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in
localized date formats.
Date.prototype.toLocaleString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocalestringsupportslocales() { try { new date().tolocalestring('i'); } catch (e) { return e instanceof rangeerror; } return false; } using locales this example shows some of the variations in
localized date and time formats.
Date.prototype.toLocaleTimeString() - JavaScript
to check whether an implementation supports them already, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaletimestringsupportslocales() { try { new date().tolocaletimestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in
localized time formats.
Float32Array - JavaScript
float32array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Float64Array - JavaScript
float64array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Int16Array - JavaScript
int16array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Int32Array - JavaScript
int32array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Int8Array - JavaScript
int8array.prototype.tolocalestring() returns a
localized string representing the array and its elements.
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
examples datetimeformat outputs
localized, opaque strings that cannot be manipulated directly: var date = date.utc(2012, 11, 17, 3, 0, 42); var formatter = new intl.datetimeformat('en-us', { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalseconddigits: 3, hour12: true, timezone: 'utc' }); formatter.format(date); // "monday, 12/17/...
Intl.DateTimeFormat - JavaScript
var date = new date(date.utc(2012, 11, 20, 3, 0, 0)); // tolocalestring without arguments depends on the implementation, // the default locale, and the default time zone console.log(new intl.datetimeformat().format(date)); // → "12/19/2012" if run with en-us locale (language) and time zone america/los_angeles (utc-0800) using locales this example shows some of the variations in
localized date and time formats.
Intl.NumberFormat() constructor - JavaScript
possible values are: "symbol" to use a
localized currency symbol such as €, this is the default value, "narrowsymbol" to use a narrow format symbol ("$100" rather than "us$100"), "code" to use the iso currency code, "name" to use a
localized currency name such as "dollar", currencysign in many locales, accounting format means to wrap the number with parentheses instead of appending a minus sign.
Intl.NumberFormat.prototype.formatToParts() - JavaScript
examples comparing format and formattoparts numberformat outputs
localized, opaque strings that cannot be manipulated directly: var number = 3500; var formatter = new intl.numberformat('de-de', { style: 'currency', currency: 'eur' }); formatter.format(number); // "3.500,00 €" however, in many user interfaces there is a desire to customize the formatting of this string.
Intl.NumberFormat - JavaScript
var number = 3500; console.log(new intl.numberformat().format(number)); // → '3,500' if in us english locale using locales this example shows some of the variations in
localized number formats.
Math.cbrt() - JavaScript
-pow(-x, 1/3) : pow(x, 1/3); }; })(math.pow); //
localize math.pow to increase efficiency } examples using math.cbrt() math.cbrt(nan); // nan math.cbrt(-1); // -1 math.cbrt(-0); // -0 math.cbrt(-infinity); // -infinity math.cbrt(0); // 0 math.cbrt(1); // 1 math.cbrt(infinity); // infinity math.cbrt(null); // 0 math.cbrt(2); // 1.2599210498948732 specifications specification ecmascript (ecma-262)the definition of 'math.cbrt...