URL Maps (Multilingual)

Last Updated: Aug 21, 2019
documentation for the dotCMS Content Management System

DotCMS automatically handles multilingual URL mapped content in multiple languages. Since each language version of content has a different title in the appropriate language, URL maps automatically include the translated title as part of the URL map. For information on how to set up URL mapped patterns on content types, please see the URL Map documentation.

In addition, dotCMS automatically sets the language in the session to match the language of the version of the page chosen. If the URL mapped pattern refers to a Spanish contentlet, then Spanish language is set in the session, and the Spanish language version of the page is displayed. If the same pattern is requested, but ends in a reference to a French contentlet, then French language is set in the session, and the French language version of the page is displayed.

Shared URL-Mapped Path

Although the page names may vary for each language version of the content, the URL mapped path must be shared among all language versions of the content. For example:


However you may not combine the URL-mapped title of a page in one language and also include a directive to display the page in a different language. For example, if English is language_id=1 and Spanish is language_id=2, then the following may not be done from a URL mapped page and will result in a 404 error:


This means, for example, that if you use a language flag switch in the header, the switch needs Velocity programming built-in to check if there is URL Mapped content in that language, and then redirect the browser to the corresponding URL mapped address for the content in that language.

On this page