[opencms-dev] Multilanguage pages
Carl Alex Friis Nielsen
cfn at kb.dk
Mon Nov 13 12:40:48 CET 2006
-----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
More information about the opencms-dev
mailing list