Taxonomy Plugin Localization - BloomReach Experience - Open Source CMS

This article covers a Hippo CMS version 11. There's an updated version available that covers our most recent release.

14-12-2016

Taxonomy Plugin Localization

Introduction

Goal

Localize your taxonomies.

Summary

The Taxonomy Plugin supports localization out-of-the-box. Category names and descriptions can be translated within the taxonomy editor. Supported locales can be configured per taxonomy.

The labels for taxonomy fields in document types can be translated using resource bundles.

Taxonomy Plugin 3.0.1 (for Hippo CMS/DX 11) introduces a new localization implementation. For more information, see Deprecation and removal of the hippo:translated model in the upgrade documentation.

Taxonomy Category Localization

Categories in a taxonomy can be localized. The desired set of languages can be specified when the taxonomy is created in the setup application.

If the set of available languages doesn't contain a language you want to add, you can add it manually through the CMS Console at

/content/taxonomies/[taxonomy-handle-node]/[taxonomy-node]/@hippotaxonomy:locales

For example:

/content/taxonomies
  + exampletaxonomy (hippo:handle)
    + exampletaxonomy (hippotaxonomy:taxonomy)
      - hippotaxonomy:locales = {en, nl} (String, multiple)

Any valid locale name is supported.

A category can be localized by specifying a (translated) name and description for each language in the taxonomy editor:

The localized information for a category is stored in hippotaxonomy:categoryinfo nodes as follows:

/content/taxonomies/exampletaxonomy/exampletaxonomy
  + Transport_and_infrastructure (hippotaxonomy:category)
    - hippotaxonomy:key = Transport_and_infrastructure
    + hippotaxonmy:categoryinfos (hippotaxonomy:categoryinfos)
      + en (hippotaxonomy:categoryinfo)
        - hippotaxonomy:name = Transport and Infrastructure (String)
        - hippotaxonomy:description = Transportation and Infrastructure description (String)
      + nl (hippotaxonomy:categoryinfo)
        - hippotaxonomy:name = Transport en infrastructuur(String)
        - hippotaxonomy:description = Beschrijving transport en infrastructuur (String)
    + Air_transport (hippotaxonomy:category)
    + Public_transport ((hippotaxonomy:category))

Taxonomy Field Translations for Document Types

The taxonomy field of a document type can be translated using the resource bundles that were introduced in Hippo CMS 11. To change the name of the field, go to the CMS Console, navigate to the node

/hippo:configuration/hippo:translations/hippo:types/[project-namespace]:[document-type]/[language]

and add a property named hippotaxonomy:keys in which you can set the name of the field.

You can also use a generic name for all languages by navigating to the node

/hippo:namespaces/[project-namespace]/[document-type]/editor:templates/_default_/classifiable/cluster.options

and adding a property caption that will contain the field name. It is also possible to set this property through the document editor interface of the CMS (the same applies to the "hint" field)

This only applies to the default taxonomy field (using the hippotaxonomy:classifiable mixin), when using a secondary taxonomy on a document, please see this page.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?