Staś Małolepszy

Pseudolocales for Firefox OS

Pseudolocales like Ȧȧƈƈḗḗƞŧḗḗḓ Ḗḗƞɠŀīīşħ (Accented English) are useful for localizability testing and can now be enabled in developer builds of Firefox OS.

With bug 900182 fixed, it is now possible to enable pseudolocales in developer builds of Firefox OS. Pseudolocales are based on US English and are automatically generated according to strategies defined in build/l10n.js.
Presently, two pseudolocales can be enabled in custom Gaia builds:

  • Ȧȧƈƈḗḗƞŧḗḗḓ Ḗḗƞɠŀīīşħ (Accented English, code: qps-ploc), which uses recognizable Unicode diacritics in lieu of ASCII letters and doubles each vowel to extend the length of strings, and

  • ‮Wıɹɹoɹǝp Ǝuƃʅısɥ‬ (Mirrored English, code: qps-plocm), which uses flipped Unicode characters for letters and surrounds each word with Unicode formatting codes known as RLO and PDF to force the direction of the text to be right-to-left (RTL).

A screenshot of Accented and Mirrored English

What to test

Pseudolocales make it easy to do localizability testing without the need of knowing a foreign language. The strategies used to autogenerate the pseudo-localized strings create text which is readable by an English speaker without much trouble.

  • If you develop your app in English and then test in a pseudolocale, you'll have a chance to spot strings which are not localizable due to a missing or mistyped data-l10n-id.

  • Use the Accented English pseudolocale (qps-ploc) to quickly check how your UI will scale to languages which have longer translations, on average. All strings in Accented English are artificially made a bit longer by repeating certain characters twice.

  • The Unicode glyphs used in pseudolocales make for a good testbed of line height issues and font rendering.

  • Use the Mirrored English pseudolocale (qps-plocm) to simulate an RTL interface in your app. Check for layout issues and positioning of UI elements. A few helpful tips on how to deal with RTL in HTML/CSS can be found on MDN: Developing Bidi Apps.

How to build

Pseudolocales are enabled by default in custom builds of Gaia, so you can likely continue building it as you've always have:


For non-standard setups, use the following make flags:

GAIA_CONCAT_LOCALES=1 LOCALES_FILE=shared/resources/languages.json make

You can then go into Settings and change the language of the device in the Language panel. Or, you could set one of the pseudolocales to be the default locale from the get-go, with:


The pseudolocales are currently generated on build time as part of the webapps-optimize logic, and as such tey don't work in DEBUG=1 builds yet.

Next steps

An important piece of the initial pseudolocales work was the creation of a framework which allows adding new locales in the future. Accented and Mirrored English are the first two useful ones, but I'd like to add at least one more, and also improve the strategies for generating the existing ones.

I filed a few follow-up bugs. I think the following two are particularly interesting:

  • Bug 1011520 - Add a fake East-Asian pseudolocale,

  • Bug 1011528 - Improve the heuristics used to make Accented English strings longer.

Discuss on Hacker News
Published on 27.05.2014

Staś Małolepszy

Thoughts about the Internet, the information society, Mozilla and human-computer interactions.

Latest notes