<< ALL BLOG POSTS

Localizing Subsites with Lineage and LinguaPlone

Table of Contents

We recently had a customer interested in both localizing their main site and adding subsites to it (a "subsite" is a folder of the main site that has been transformed into a virtually autonomous site with Lineage).

It is a situation that many companies are facing: they have a website for the company and wish to have an independent website for one of their top products/brands. This subsite will need a personalized look and feel, but needs to be updated and managed like it's part of the main site.

Naturally, after localizing the main site, the next step was to know if we could localize the subsites as well.

Introduction to the Tools We Used

Lineage is a Six Feet Up product which allows subfolders of a Plone site to appear as autonomous Plone sites to the everyday user, without the extra effort normally required  to maintain content in a separate site.

    • It is ideal for customers with a need for multiple seemingly independent sites under a centralized management.
    • It can be combined with ThemeSwitcher for subsites to have their own look and feel.

LinguaPlone is the multilingual/translation solution for Plone. It achieves this by being as transparent as possible and by minimizing the impact for existing applications and Plone itself.

    • LinguaPlone allows you to virtually clone your site in another language, on the same instance.
    • When combined with the language selector, you can switch localization from anywhere in one click.

ThemeSwitcher is a tool which lets you apply a Plone theme to a specific folder within your site.

    • It ships with a user interface to easily apply/remove themes recursively on a given folder.
    • When combined with Lineage, it applies a unique look and feel for each subsite.

Process

The main site can be seen at www.ressoftware.com

    Creating a subsite: First, create a folder where you want this subsite to be. By default I'd recommend at the siteroot. Then on this folder's view, use the sub-types tab to add the child site sub-type to this folder. It is now a lineage subsite; it looks just like before, but gives the user the impression of being an independent site. Then using the themeswitcher tab, you can apply a different theme to you subsite.

      • Example of the "vdx" product's subsite: www.ressoftware.com/vdx
      • Note that the domain name changes, but /vdx is not a link, we are seeing an actual folder, behind some apache rewrite rules.

     

      Localizing the main site: Localizing a site is a long process. It requires almost every single item in the site to be translated into a new language. Once localized (with the translate-into tab), an item will appear in both its normal location, in its original language and in its localized location, in another language. LinguaPlone will create a parallel tree structure for your localized content.

       

        Localizing the subsite: Here comes the tricky part. LinguaPlone has no idea the folder you are trying to localize is a subsite using Lineage and ThemeSwitcher, so when you localize it, it creates a simple folder in the parallel tree structure of your foreign language. You will then need to manually go to this folder and make it a childsite, as well as reapply the special theme through ThemeSwitcher. Actually. it wasn't too hard. It only needs done once, for all the items under the subsite's root can now be localized and they will find their way to the localized subsite. The actual trick is that the localized subsites do not appear under the same parent folder as the original subsite. Instead, they are virtually under the original subsite itself.

        Summing Up

        The combination of Lineage, LinguaPlone and ThemeSwitcher allows a simple and straightforward way to deal with what often proves a complex and daunting task when dealing with localized subsites.  It gives you the flexibility required for complex branding and localization, without having to the sacrifice the ease of maintenance that was one of the main reasons you got a content management system in the first place.

         

        Are you using any combination of Lineage, LinguaPlone, and ThemeSwitcher? Do you have an original use case of a subsite you want to share?

    Related Posts
    How can we assist you?
    Thank you! Your submission has been received!
    Oops! Something went wrong while submitting the form.