Creating Translation Rules

Multiple rules can be created to support complex translation requirements. For example, one project you may be working on requires all fields of the model to be translated, but on another only description fields must be translated while titles are left untranslated.

Translation rules are designed to handle such scenarios. However in this example we illustrate how to create rules by focusing on a simple, single configuration.

There is a Translation Configuration console available for configuring translation rules. To access it:

  1. Navigate to Tools > General.
  2. Click Translation Configuration.

In the Translation Configuration UI, there are several options available for your translation rules. Here we highlight the most necessary and typical steps required for a basic headless localization configuration.

  1. Click Add Context, which lets you add a path. This is the path of the content that is be affected by the rule.
    Add context

  2. Use the path browser to select the required path and click the Confirm button to save. Remember, Content Fragments, which hold headless content, are generally located under /content/dam/<your-project>.
    Select the path

  3. AEM saves the configuration.

  4. Select the context you created and then click Edit. This opens the Translation Rules Editor to configure the properties.
    Translation rules editor

  5. By default all configurations are inherited from the parent path, in this case /content/dam. Uncheck the option Inherit from /content/dam to add additional fields to the configuration.

  6. Once unchecked, under the General section of the list, add the property names of the Content Fragment Model(s) that you previously identified as fields for translation.

    1. Enter the property name in the New Property field.
    2. The options Translate and Inherit are checked automatically.
    3. Click Add.
    4. Repeat these steps for all the fields that you must translate.
    5. Click Save.
      Add property

You have now configured your translation rules.

Advanced Usage

There are several additional properties that can be configured as part of your translation rules. In addition, you can specify your rules by hand as XML, which allows for more specificity and flexibility.

Such features are generally not needed to get started localizing your headless content, but you can read about them further in the Additional Resources section if you are interested.

What’s Next

Now that you have completed this part of the headless translation journey you should:

  • Understand what the translation rules do.
  • Be able to define your own translation rules.

Build on this knowledge and continue your AEM headless translation journey by next reviewing the document Translate content where you will learn how your integration and rules work together to translate headless content.

Additional Resources

While it is recommended that you move on to the next part of the headless translation journey by reviewing the document Translate content, the following are some additional, optional resources that do a deeper dive on some concepts mentioned in this document, but they are not required to continue on the headless journey.

Experience Manager


Driving Marketing Agility and Scale: Transforming your Content Supply Chain with AI

Online | Strategy Keynote | General Audience

Marketers everywhere are feeling the pressure to deliver impactful campaigns faster and at greater scale. This Strategy Keynote explores...

Tue, Mar 18, 2:30 PM PDT (9:30 PM UTC)

Register

The True Cost of a Failed Implementation

Online | Session | General Audience

A failed implementation isn’t just an inconvenience — it costs real revenue. Poor execution and misaligned tools disrupt pipelines,...

Wed, Mar 19, 2:00 PM PDT (9:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more