SV: [opencms-dev] Multilanguage pages

Stefan Uldum Grinsted stefan at e-nation.dk
Mon Nov 13 14:52:25 CET 2006


I agree en Carl's approach. That's how we develop sites for our customers as
well.

I just have one comment. 
To make the site, or more specifically the url's, more search engine
optimized, you shouldn't that strictly use a parallel structure.
Allow me to explain:

If you have the document 
	/en/products/device_number_1750.html
And a sibling at the same location in the Danish site:
	/da/products/device_number_1750.html

If you the search for the Danish device name "Produkter Dims nummer 1750",
it will probably be found if the text is on the page. But if the url to the
Danish product had been
	/da/produkter/dims_nummer_1750.html
The result would score a higher page rank, since the searched words are part
of the url.

To make the linking between versions available on the site, you should use
the readSiblings(...) method of CmsObject to determine other language
versions of the file.

Just a hint. Enjoy!

/ Stefan Grinsted

-----Oprindelig meddelelse-----
Fra: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] På vegne af Carl Alex Friis Nielsen
Sendt: 13. november 2006 12:41
Til: The OpenCms mailing list
Emne: RE: [opencms-dev] Multilanguage pages

-----Original Message-----
From: opencms-dev-bounces at opencms.org@KB On Behalf Of Eneko González
Benito <eneko.gonzalez at elpagestion.com>

> How do you do it?

We have a folder for each locale we want our site to be available in
(currently "en" and "da"). Each of these folders contain the entire
version of our site in that locale.

All resource names and folder structures are the same in the two
folders where content in both locales exist (meaning that there can
exist danish and english content which isn't available in the other
locale, but if content is available in both locales the relevant
resources names only differ in the "da/en" part - e.g.
if the Danish version of a resource foobar is found in
/da/foo/bar/foobar.html the English version is found in
/en/foo/bar/foobar.html)
The parallel structure is used to automatically generate links
between the Danish and English versions of the same content so you
can switch language when viewing any resouce available in the other
locale.
The method also scales if adding more locales.

templates and other jsp's only exist in one version which uses
localized resource bundles to load locale dependent stuff
depending on the context they are invoked from.

the index page of our site redirects to the index page in the
/da/ folder from where the index page in the /en/ folder can
be reached (through the automatically generated link from
/da/index.html to /en/index.html).

> I'd like to have a folder for each language, but i 
> don't want the user sees it.

In our method this is not possible since the locale is part
of the path to any resource available to the outside.
No simple way to hide this from the users is immediately clear
to me, but given enough resources I guess you could program
yourself out of any problem.

Cheers,

Carl

_______________________________________________
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