One Page Template, Multiple Languages

7 min read /

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.

After making your selection, you might go ahead and  translate the page  within Confluence. Alternatively, you could  bulk-translate pages  using an external translation management system.


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  sv-translation . The macro requires a  language   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:

<ac:structured-macro ac:name="sv-translation">
  <ac:parameter ac:name="language">en</ac:parameter>
  <ac:rich-text-body>
      <!-- Translated page content -->
  </ac:rich-text-body>
</ac:structured-macro>

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:

Here's how it can be accomplished:

  1. Create or edit a page template in your Confluence space where Scroll Translations has been enabled.
  2. 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-translation block containing the corresponding language key, as listed below (e.g. en for English):
<ac:structured-macro ac:name="sv-translation">
  <ac:parameter ac:name="language">en</ac:parameter>
  <ac:rich-text-body>
      <h2>English Subheading</h2>
  </ac:rich-text-body>
</ac:structured-macro>

<ac:structured-macro ac:name="sv-translation">
  <ac:parameter ac:name="language">de</ac:parameter>
  <ac:rich-text-body>
     <h2>Deutsche Zwischenüberschrift</h2>
  </ac:rich-text-body>
</ac:structured-macro>


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.

What Next?

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.

What's more, in combination with our Scroll Versions content management add-on, you can publish translated content to other Confluence spaces, and make it available to the public.

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.

Try Scroll Translations with a free 30-day trial.

Does your use case demand a highly specific Confluence blueprint? Then feel free to contact us. As Atlassian Platinum Experts, we are happy to build custom blueprint plug-ins for you.

If you have any questions, please drop us an email at info@k15t.com, or leave a comment below.