mozilla
Your Search Results

    Implementing Pontoon in a Mozilla website

    Pontoon is a web-based, What-You-See-Is-What-You-Get (WYSIWYG), localization (l10n) tool used to localize web content. At Mozilla, we currently use Pontoon to localize various Mozilla websites and the Firefox OS app interface, known as Gaia. Pontoon is a very simple and intuitive tool that requires little to no technical skill for localizers to use, which will decrease your time-to-publish for localized versions of your web project. Here we'll discuss how you can add Pontoon to your Mozilla web project.

    Would you like to improve Pontoon? Learn how to get involved on GitHub.

    A. Make your site localizable

    We realize that these are already considered to be standard best practices for developing web projects at Mozilla, but we feel it's good to add them here as a little reminder.

    1. Ensure that your web project supports one of the l10n frameworks (gettext, l10n.js, L20n, lang, etc.).
    2. Extract your localizable strings into the appropriate resource file.
    3. Add that resource file to the project's or separate repository (SVN, HG, Git, Transifex, etc.).

    B. Enable Pontoon on your site

    To enable cross-origin communication with Pontoon, you need to link a script from your HTML <body> element:

    <script src="https://pontoon.mozilla.org/pontoon.js"></script>

    Now Pontoon can talk to your site, detect content and make it localizable in place.

    Note on CSP: If your project uses CSP, please make sure that loading it inside iframe and loading remote CSS and remote images is permitted for domain pontoon.mozilla.org.

    C. Add your site to Pontoon

    You now have to set up your project in Pontoon's administrator portal. If you don't have administrative privileges, please get in touch with Pontoon developers.

    admin reqs

    1. Select Add new project.
    2. Fill in all of the mandatory fields with details unique to your project. These fields are:
      • Project name and slug.
      • Chosen locales.
      • Repository type and URL.
    3. Fill in the remaining fields as they relate to your web projects:
      • Website URL (mandatory for in place localization).
      • Default website width if you don't want to use the whole browser window (think Firefox OS).
      • Check if you want to enable links on the project website.
      • Define subpages for easier access.
      • Project info.
    4. Save project.
    5. Update translations from repository.

     

    Once you have your project added to Pontoon, localizers can begin to use it to localize your web project. Congratulations! Now take a bow and press onward!

     

     

     

    Document Tags and Contributors

    Tags: 
    Contributors to this page: jbeatty, mathjazz
    Last updated by: mathjazz,