In Chapter 2, we looked at configuring character set encoding (ISO-8859-1 and UTF-8) for OpenCms. In Chapter 3, we looked at loading and using multiple languages for the Workplace. In this section, we will examine methods of creating multi-language sites using OpenCms.
While the OpenCms Workplace was designed to accommodate multiple languages, there is no formal structure to assist in developing multi-language websites. While it is possible to create multiple bodies (e.g. one for each language) in a particular page document, the properties can only be in one language. Consequently, it is usually easiest to create a separate document for each language.
The most widely deployed method of structuring multi-language sites with OpenCms is to create separate directories, one for each language, in the root directory. For instance, to host both German and English versions of my site, I would create two root-level directories: /de/
and /en/
. Inside these, I would place language...