Multilingual content
How to make RichDocument translatable through LinguaPlone
Plone supports multi-lingual content using "LinguaPlone":/products/linguaplone. Adding multilingual support to your content is surprisingly easy. LinguaPlone defines some extensions to some of Archetypes' internals. By conditionally importing from LinguaPlone instead of Archetypes, you can ensure that you will get the LinguaPlone extensions where available, and still work if LinguaPlone is not installed.
All of ATContentTypes is already LinguaPlone aware. To add LinguaPlone support to RichDocument, all that is needed is to add the following to 'content/richdocument.py' and 'content/attachments.py' ::
try:
from Products.LinguaPlone.public import *
except ImportError:
# No multilingual support
from Products.Archetypes.public import *
This tries to import LinguaPlone's version of Archetypes' 'public' module, and if it fails, falls back on Archetypes' default version. When LinguaPlone is installed, RichDocument will gain the 'translate' menu and become translatable.
Previous:
Non-structural folders
