[opencms-dev] Multilanguage in a html page - OpenCMS 6.2.1
spyros
spyros at hec.greece.org
Sat Jun 24 11:11:27 CEST 2006
This works with siblings. You have to create a sibling of your page, for the
second language. Then set the locale property to "en" for the main page and
"de" for the sibling.
Viewing the page should show the english version, and viewing the sibling
should show the german.
Alternatively, adding "?__locale=de" to your mainpage url should also
produce the german.
Spyros Michas
----- Original Message -----
From: "ANDRES SAYAGO" <asayago at ebstudio.com>
To: "The OpenCms mailing list" <opencms-dev at opencms.org>
Sent: Friday, June 23, 2006 6:49 PM
Subject: [opencms-dev] Multilanguage in a html page - OpenCMS 6.2.1
> Hello.
>
> The documentation says: "You can write content for each language. ... can
> write one page in multiple languages. Select English and type in some
> English text. Save. Select German and type in some German text. Save. Now
> you have a page available in two languages. Based on the browser's
> language settings, the end user will be served whichever language they
> prefer!"
>
> Ok. I make one page and put text in both languages (selecting English and
> then German).
>
> The content is (edited with "Edit controlcode" option):
>
> -------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd">
> <page language="de">
> <element name="text1">
> <links/>
> <content/>
> </element>
> <element name="body">
> <links/>
> <content><![CDATA[Dieser Text ist in deutschsprachigem]]></content>
> </element>
> </page>
> <page language="en">
> <element name="text1">
> <links/>
> <content/>
> </element>
> <element name="body">
> <links/>
> <content><![CDATA[<p>This text is in English
> language</p>]]></content>
> </element>
> </page>
> </pages>
> -------
>
> I publish the page. In the browser, I select "en" (English) and load the
> page. I can read the the English text written. Then, I change the language
> configuration in the browser to "de" (German) and I refresh the page. I
> continue seeing the same English text. I can see the German text!!
>
> Why? I am making something bad? Is it an error of OpenCMS 6.2.1?
>
> Note: In both cases, I read de source code and the two pages (read like
> "en" and "de", by the browser) and both had the following line, no more
> about language:
>
> <meta name="language" content="de, en">
>
> Can you help me?
>
>
> Andrés Sáyago
>
> --
> JORGE ANDRES SAYAGO PEÑALOZA
> WebStudio e-Solutions S.A.
> asayago at ebstudio.com
> Teléfono: +57 6106834 ext. 107
> Fax: +57 6106834 ext. 108
> Móvil: +57 3005528542
> Cra. 93B No. 12-48 Of. 302
> Bogotá D.C., Colombia
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
More information about the opencms-dev
mailing list