[opencms-dev] Best practices for multilanguage site
Claus Priisholm
cpr at codedroids.com
Wed Feb 27 08:54:46 CET 2008
I've done a number of multilingual sites and there are pros and cons of
the various methodologies. But the folder-per-locale is my preferred one
because of its flexibility.
If you skip the folder-per-locale you are working against the default
behaviour of OpenCms. There are workarounds on the mailing list but the
most obvious problem is that the properties on a file aren't
localizable. Also, as you mention, you are forced to publish all locales
for a given file at the same time.
If you use folder-per-locale then you have an option in either using
siblings or plain copies of the files. You can even have distinct folder
structures for each site, but then you loose the option to, easily, have
a "link" between the same pages in the different language-folders. If
you are using siblings you could still have that link assuming that you
don't use siblings for anything else (than making localized "copies" of
pages).
Siblings, of course, also suffer from the "it's all one file" publishing
problem, but adds the convenience that you can edit content for multiple
languages from within the editor and it is easier to keep track of
localized "copies".
But with the folder-per-locale you have the option, and I have set up
sites that uses either copies or siblings, or a combination depending on
the organisations needs.
Whether you want to implement the folder-per-locale by means of
"sub-folders" as /en/, /da/ and so forth or you go for a multi-site
setup again depends on the requirements. If you have only one domain,
then you won't get far with the multi-site setup, but if you have a
domain for each language (e.g. www.codedroids.com for english and
www.codedroids.dk for danish) you could choose multi-site setup. But you
can also serve multiple domains from within one site (which is actually
what happens with the codedroids-site) - then you should do the
domain-trickery in apache (assuming you have a typical setup running
tomcat behind apache).
/Claus
Yves Glodt wrote:
> On Thursday 21 February 2008, Carl Alex Friis Nielsen wrote:
>> If you retain the same naming in the two structures you can easily
>> compute the links between the different language versions of the same
>> page - thats how we do it. - same name, but localised title
>
> Hello Carl,
>
> I agree with this and this is what I was thinking to do for my project.
> But I just read in the OpenCms 6.0 Book that keeping an (e.g.) /dk/
> and /en/ structure is "deprecated"...
>
> So, the alternative I see is an site with no subdirs per language, but
> with multilanguage documents.
>
> The inconvenience I see with this is that (afaics) if you edit a
> document in english and in danish separately, you cannot publish just
> one part of it, since the document is the same.
>
> In my case I need to publish german separately from english, this is why
> I think I will go with /en/ and /de/ structures.
>
> I would be happy to hear about some more experience,
>
> Best regards,
> Yves
>
>
>>> -----Original Message-----
>>> From: opencms-dev-bounces at opencms.org
>>> [mailto:opencms-dev-bounces at opencms.org]On Behalf Of Yves Glodt
>>> Sent: Thursday, February 21, 2008 10:38 AM
>>> To: opencms-dev at opencms.org
>>> Subject: [opencms-dev] Best practices for multilanguage site
>>>
>>>
>>> Hello,
>>>
>>> what would be the best practices for creating a large
>>> multilanguage website
>>> with OpenCms?
>>>
>>> The language should be selectable from every page, without
>>> navigating you away
>>> from the currently selected content.
>>>
>>> I have seen some sites created folders for the language in
>>> the root of their
>>> folder structure, like e.g.:
>>>
>>> /sites/siteA/en/index.html
>>> /sites/siteA/en/aboutus/index.html
>>>
>>> /sites/siteA/de/index.html
>>> /sites/siteA/de/ueberuns/index.html
>>>
>>> is this a good idea? Is there any better idea? :-)
>>>
>>> Best regards,
>>> Yves
>>>
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> 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
>
>
>
--
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
--
Javadocs and other OpenCms stuff:
http://www.codedroids.com/community/opencms
More information about the opencms-dev
mailing list