Axel Hecht Mozilla in Your Language

September 27, 2012

Language packs are restartless now

Filed under: L10n,Mozilla — Tags: , — Axel Hecht @ 4:04 am

Language packs are add-ons that you can install to add additional localizations to our desktop applications.

Starting with tomorrow’s nightly, and thus following the Firefox 18 train, language packs will be restartless. That was bug 677092, landed as 812d0ba83175.

To change your UI language, you just need to install a language pack, set your language (*), and open a new window. This also works for updates to an installed language pack. Opening a new window is the workaround for not having a reload button on the chrome window.

The actual patch turned out to be one line to make language packs restartless, and one line so that they don’t try to call in to bootstrap.js. I was optimistic that the chrome registry was already working, and rightfully so. There are no changes to the language packs themselves.

Tests were tricky, but Blair talked me through most of it, thanks for that.

(*) Language switching UI is bug 377881, which has a mock-up for those interested. Do not be scared, it only shows if you have language packs installed.


  1. Hi Axel,
    Does this mean that languagepacks are finally upgradeable with each new release of Firefox?

    Comment by Wim — September 27, 2012 @ 5:10 am

  2. Language packs will continue to be incompatible by default, just because they are.

    I don’t know what the update experience is right now, to be honest. If this changed that at all, it would only change it in the way that you’d get an addon update that is now compatible and you don’t need to restart your browser. You’d still have to do the new window dance, though.

    Comment by Axel Hecht — September 27, 2012 @ 5:20 am

  3. This is cool, thanks!

    Comment by Ben Hearsum — September 27, 2012 @ 5:34 am

  4. Does this mean that only one global installer need to be offered for download and the localization just be handled by choosing the language on the first run page?

    Comment by And — September 27, 2012 @ 6:16 am

  5. And, what problem would that fix?

    Note, we’re using some localized files at profile creation time, notably the default bookmarks.

    Also, I don’t know exactly how convenient the update story will be.

    Comment by Axel Hecht — September 27, 2012 @ 7:11 am

  6. – Fewer installer packages to generate and host.
    – No need to guess the users preferred locale, so no risk of guessing wrong, and no need for an alternative languages page, so a simpler download page.
    – Fewer partial update files to generate

    Comment by And — September 27, 2012 @ 9:24 am

  7. How about restartless dictionaries? I really dislike writing a lengthy comment in a textarea that does not autosave, just to find out that I don’t have the dictionary for a given language installed.

    Comment by loe — September 27, 2012 @ 11:09 am

  8. Dictionaries are restartless for a while now. I actually used their tests as basis for the langpack tests.

    Comment by Axel Hecht — September 27, 2012 @ 2:36 pm

  9. Strange, which ones? I just tried the latest nightly 18.0a1 (2012-09-27) on this page: Clicking around I didn’t find any dictionaries that were compatible, used the “install anyway” option and got a notice about restart being needed after each one of them.

    Comment by loe — September 27, 2012 @ 10:58 pm

  10. loe, I filed, many dictionaries just don’t set their addon type.

    Comment by Axel Hecht — September 28, 2012 @ 6:02 am

  11. That’s cool. Let’s change the build scripts to generate langpacks automatically and publish them on AMO.

    Comment by Tomer Cohen — September 28, 2012 @ 6:25 pm

  12. And, I wouldn’t care about generation and hosting.

    As for the locale selection experience, I’d need mockups to gauge. Right now, I can only see us moving the language-guessing from the web into the installer.

    Also, langpacks being restartless would only be a small step between today and a scenario in which we can do one binary plus all localization in dynamic packages.

    Comment by Axel Hecht — September 30, 2012 @ 10:17 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress