[opencms-dev] Support for multilingual content...?

Laurent Gauthier lgauthier at opnworks.com
Wed Nov 26 17:02:00 CET 2003


I have consulted previous threads on the need to support multilingual
resources (ex: to be able to create a page and specify its content for
different languages/locales) but no definite conclusion/direction seems
to emerge from these threads.

The current way to handle multilingual content appears to be to create
parallel folder trees for each desired language. However, this doesn't
allow explicit references between the various local-specific versions of
a given page. If one updates a page for one locale, the system cannot
"know" or "guess" that the corresponding page(s) in the other languages
need to be revised or updated.

One way to address this would be to have a resource (a CmsFile) contain
a Collection (Map?) of contents, one per desired locale. 

When creating a page, you could specify which locales are to be
supported.
When editing the page, you could switch between locales and edit
localized content for the file/resource.
When viewing/previewing a page, the system would display the content
based on the locale in the Session.

Some outstanding issues are things like: should it be possible to
localize metadata (keywords, description, title etc)?

Looking at the OpenCMS source and JavaDoc, it appears that this would
have far reaching implications and require substantial refactoring of
core classes and may also affect the way OpenCMS retrieves content from
the VFS (essentially, all content acccess would need to be Locale
sensitive). In other words, it may be quite disruptive to the system as
a whole.

Another way to address the requirement may be to have a special kind of
"Link" ressource type (a MultilingualLink). One that contains references
to locale-specific ressources. When creating/editing such a Link, one
would specify the desired Locales to be supported and possibly,
automatically create (if needed) files for each desired Locale in the
proper folders. When following a MultlingualLink the actual URL would be
based on the locale of the Session. I am not sure, at this point, how we
could/should manage and expose dependencies between target pages with
this approach (maybe with a special LinkEditor that supports editing the
Link targets...). Would it be possible/desirable for a "target"
page/resource to "signal" the link(s) that point to it that it has
changed and that other, localized versions of the same page need
revision?

My questions are thus the following:
- Do others agree there is a need to support multilingual content?
- Has anybody come up with a tentative design/solution that could
quickly and easily meet most of the requirements without too much
disruption?
- Is there a plan/roadmap to move towards support for multilingual
content in OpenCMS?

Feedback, comments, suggestions etc are welcome.

Laurent




More information about the opencms-dev mailing list