How to generate locale specific output?

Posts: 7
Joined: Wed Dec 18, 2019 9:20 am

How to generate locale specific output?

Post by ejsumi » Tue Dec 08, 2020 4:56 am

Hi Team,

We have a requirement where we have to generate output for multiple locale in English like US English, UK English.
For example, customize in US English and customise in UK English
How can we generate locale-specific output in Oxygen 21?


Posts: 356
Joined: Mon Dec 05, 2011 6:08 pm

Re: How to generate locale specific output?

Post by ionela » Tue Dec 08, 2020 1:51 pm


Just to double check, are you trying to customize the static labels? If yes, you can follow this procedure from our user manual:
How to Localize the Interface of WebHelp Responsive Output

Ionela Istodor
oXygen XML Editor and Author Support

Posts: 7
Joined: Wed Dec 18, 2019 9:20 am

Re: How to generate locale specific output?

Post by ejsumi » Tue Dec 08, 2020 4:22 pm

Hi Ionela,

No, we were looking if there is a way to change the text of the content based on the locale.
For example, for US customers and UK customers, the words would differ on 'iz' or 'is' like customize/customise, authorization/authorisation, etc or in words like cancelled/canceled.

Adding DITAVAL is one method.
But is there another option, since we have got a lot of topics, that have to be delivered for the UK and US locale. Adding DITAVAL to every such word topic by topic would be time-consuming. Is there another option?

Site Admin
Posts: 201
Joined: Thu Dec 24, 2009 11:21 am

Re: How to generate locale specific output?

Post by alin » Thu Dec 17, 2020 7:24 pm


You can automatically add DITAVAL profiling attributes for your use case using a custom XML Refactoring Operation (XRO): For example you can create a custom XRO that, based on an input list of words, can replace each word occurrence in content with a fragment like the one below:

Code: Select all

<ph audience="en-us">authorize</ph><ph audience="en-uk">authorise</ph>
The file containing the list of words that have different forms for different locales can have the following structure:

Code: Select all

        <locale value="en-us">customize</locale>
        <locale value="en-uk">customise</locale>
        <locale value="en-us">authorize</locale>
        <locale value="en-uk">authorise</locale>
        <locale value="en-us">canceled</locale>
        <locale value="en-uk">cancelled</locale>
You can apply the XRO on a variety of scopes. One of this scopes can be the Current DITA Map hierarchy. (see the Scopes section from ... ments.html)
After executing the XRO you can see a preview with all the modifications that will be applied on content. For example:
I have created a sample XRO that tries to achieve what I have described above. You can download it from here:
The archive contains the following resources:
  • The XRO descriptor file
  • The XSLT script that is executed on each input XML file when applying the XRO
  • A sample XML file that is used by the XRO to determine which words should be replaced in the content with their locale specific forms.
    Note: You should edit this file and add more words respecting the pattern in the file.
In order to load the XRO in Oxygen please follow these instructions: ... tions.html
You can reapply the XRO multiple times on a file because once a word is profiled it is ignored on the next XRO execution.

Alin Balasa
Software Developer
<oXygen/> XML Editor

Post Reply