[opencms-dev] how should multilanguage work

Martin Kuba makub at ics.muni.cz
Thu Apr 28 13:44:59 CEST 2005


Marcus.Bjorke at alandsbanken.fi wrote:
> Hi! 
> I'm on a project that just has started that needs multilanguage. We use 
> the OpenCms 6 beta 2 since that is recommended version to start with at 
> the moment. 
> We need to have the site in Swedish, Finnish and English. We have managed 
> to add theese languages to the WYSIWYG-editor language dropdown. But what 
> I have not yet figured out is how to create pages that uses the wanted 
> language. Oh I did get it work copy-pasting the same XML Controlcode (via 
> Edit controlcode) into the Controlcode of a new page named sv_page.html in 
> the same directory as the /sites/default/demopages/languagedemo/.
> My guess is that I should use sibling instead but can't figure out how 
> siblings work. Can anyone explain what siblings are meant for? Is it only 
> for multilanguage?
> 
> The way we would like our url:s to look like is:
> www.sitename.fi/sv/
> www.sitename.fi/fi/
> www.sitename.fi/en/

You should create a sibling for each language and set property 
"language" for each sibling. I.e. you can create three siblings

index_en.html locale=en
index_fi.html locale=fi
index_sv.html locale=sv

Or you can use the fact that properties are inherited from folders,
so you can create three folder like

/en locale=en
/fi locale=fi
/sv locale=sv

and have siblings of the same file index.html in all three folders,
then each sibling will inherit the locale setting from its parent 
folder. So accesing /en/index.html you will see english,
accessing /fi/index.html you will see finish.

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
--------------------------------------------------------------



More information about the opencms-dev mailing list