Page tree
Skip to end of metadata
Go to start of metadata

The Magnolia URL Translation module builds off the previous Urltrans Module. The idea of the module is to provide a way to translate the page names in a single-tree-multi-langauge website. See enabling multilanguage content for how to set up this type of website. Using the translation module together with your translated website you can internationalize your URLs.

The original Forge based module was limited to EE edition only. In later versions EE Pro only. Now the module has been separated into two different modules. The base module is needed for anyone wishing to use URL Translation. For those using EE Pro you will also need to stack on the translation multisite module.

Installing

(warning) Magnolia 5.6+

Maven is the easiest way to install the modules. Add the following dependencies to your bundle:

<!-- Base module needed for all installs -->
<dependency>
  <groupId>info.magnolia.i18n</groupId>
  <artifactId>magnolia-url-translation</artifactId>
  <version>1.0</version>
</dependency>

<!-- Multisite extension needed for EE Pro -->
<dependency>
  <groupId>info.magnolia.i18n</groupId>
  <artifactId>magnolia-url-translation-multisite</artifactId>
  <version>1.0</version>
</dependency>

SCM

The source code for the URL Translation module can be found here: https://git.magnolia-cms.com/projects/SERVICES/repos/magnolia-url-translation/

Javadocs

Usage

This module expects to find the translated names of pages in an internationalized field called name. Consider this example from the MTE module.

/mte/dialogs/pages/pageProperties.yaml
form:
  tabs:
    - name: tabMain
      fields:

        # Here we add the name field to the page properties dialog.
        - name: name
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true

        - name: title
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true
        - name: navigationTitle
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true
        - name: hideInNav
          class: info.magnolia.ui.form.field.definition.CheckboxFieldDefinition
          defaultValue: false
          i18n: false
          type: Boolean
        - name: windowTitle
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true
    - name: tabMeta
      fields:
        - name: keywords
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true
          rows: 3
        - name: description
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          i18n: true
          rows: 5

actions:
  commit:
    class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition
  cancel:
    class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition

Migrating

For those coming from the older Forge version of the module I would suggest that you uninstall that module before moving to 5.6.

  1. Delete the filter /server/filters/cms/urltrans
  2. Change the class property of /server/rendering/linkManagement
    • Community and EE std: info.magnolia.link.LinkTransformerManager
    • Pro: info.magnolia.multisite.MultiSiteLinkTransformerManager
  3. Change the class property of /server/rendering/linkManagement/transformers/absolute
    • info.magnolia.link.AbsolutePathTransformer
  4. Remove the module.

Changelog

  • Version 1.0 MURLTRANS-1 - Getting issue details... STATUS
    • Split into two modules to accommodate webapps not using multisite.
    • STK dependency removed from old Forge version.
    • Content API removed from old Forge version. 
    • Vaadin 8 compatible.
  • No labels