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.
- Ensure that your web project supports one of the l10n frameworks (gettext, l10n.js, L20n, lang, etc.).
- Extract your localizable strings into the appropriate resource file.
- 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:
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
- Select Add new project.
- 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.
- 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.
- Save project.
- 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!