[opencms-dev] Multi-Language Question

Martin Kuba makub at ics.muni.cz
Mon Jul 25 13:34:33 CEST 2005


Anatol wrote:
> Hi all!
> 
> When creating an article or editing a page I've the option to add text 
> in german and in english by switching the dropdown menu. But if I visit 
> the page I could only see one language. How can I tell opencms to 
> display one of the other language on this website? And on which criteria 
> the default displayed language will be chossen?

The language displayed is chosed by file property 'locale', which is 
either set for that file or inherited from its folder.
You can display another language by creating a "sibling" of the file
and specifying another value for the 'locale' property.
Common practise is to have several folders like '/en' '/de'
with 'locale' property set to 'en' and 'de' respectively.
The you have the same file in both folders using the 'sibling'
feature, and it inherits different locale from the folders.

This is the default behavior. You can provide another implementation
of  org.opencms.i18n.I_CmsLocaleHandler which may decide language
using different mechanism.

Martin
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Supercomputing Center Brno             Martin Kuba
Institute of Computer Science    email: makub at ics.muni.cz
Masaryk University             http://www.ics.muni.cz/~makub/
Botanicka 68a, 60200 Brno, CZ     mobil: +420-603-533775
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2777 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20050725/4872fafa/attachment.bin>


More information about the opencms-dev mailing list