One Page Template, Multiple Languages
Today, I'd like to share with you a little secret about Scroll Translations. It’s the Confluence add-on which lets you manage Confluence content in multiple languages within a single space. This makes it simple to add page translations. But how about page templates and blueprints? Does the same apply to them?
The answer is yes. It's not only possible to create multilingual page templates – it’s easy. In this blogpost, I'll show you how to modify the troubleshooting blueprint (or any other page template) and make it speak in foreign tongues.
Multilingual Content with Scroll Translations
Our Scroll Translations add-on provides a language picker on each Confluence page. This allows users to switch between all the defined languages for the space in question.
A Glimpse Behind the Scenes
Now let's dive into the detail and see how Scroll Translations actually works. This will help you understand how it's possible to build multilingual page templates.
Each translation of a page is stored in the page itself – inside a hidden macro called
. The macro requires a
parameter, which refers to the available language keys (e.g. en for English, de for German)
Here's an example of a translation macro in Confluence's storage format:
Note: You can access Confluence's storage format using the free Confluence Source Editor plug-in. This adds an ‘<>’ icon to the Confluence editor toolbar on any page that has been saved at least once.
Templates and Blueprints in Confluence
Page templates (and the blueprint feature) are a great way to ensure a consistent page layout, and to offer instructions and guidance to Confluence authors. When creating a new page , you can base it on any available template.
Space administrators can easily create custom page templates in each Confluence space, or modify existing ones.
More advanced templates are called blueprints. These can contain a whole set of templates and a step-by-step creation wizard. This is why blueprints need to be developed separately. They are provided as plug-ins, which must be installed by Confluence administrators.
Tip: Use the Confluence Source Editor plug-in to copy page contents into your templates, including all markup and page layouts.
How to Provide Translations for your Templates
After setting up the target languages for your space and installing the Source Editor plug-in, you're ready to go multilingual with your page templates.
Here's how it can be accomplished:
- Create or edit a page template in your Confluence space where Scroll Translations has been enabled.
- Prepare the multilingual template as follows:
- Switch to the source view provided by the Confluence Source Editor plug-in.
- If you're creating a new template, you'll need to save it first in order to activate the Source Editor icon.
- In the Source Editor window, remove any existing storage format code.
For each language, insert a
sv-translationblock containing the corresponding language key, as listed below (e.g. en for English):
3. Switch to the source view provided by the Confluence Source Editor plug-in. If you're creating a new template, you'll need to save it first in order to activate the Source Editor icon.
4. In the Source Editor window, remove any existing storage format code.
5. Return to the normal Confluence template editor and extend your template's language-specific sections, then save the template.
Example: Making the Troubleshooting Blueprint Multilingual
Here's an example of a default Confluence blueprint that has a predefined structure with subheadings and instructions. By inserting storage format code that you can download here, we've extended the corresponding template to support both English and German.
And here’s the best part: if users now create a new page from the troubleshooting blueprint, the structure and layout (but not the page title or contents) will already be available in both languages.
After we've successfully created a multilingual page template with page structures for each target language, it’s much easier to translate content. This is because static elements such as structural subheadings have been pre-translated. So the translator can focus on the page’s content – bringing efficiency to localization work.
Or if you're already using one of our Scroll Exporters – such as the Scroll PDF Exporter or Scroll Office – you can quickly and easily export content in the desired language.