Use case: Plone in multi-{country, language, domain} applications

by Mikel Larreategi






Their needs

  • Multilingual: mysite.com/en, mysite.com/es, ...
  • Multi-domain: mysite.de, mysite.es, mysite.com, ...
  • Multi-everything: mysite.com/en, mysite.com/es, mysite.es/es, mysite.es/eu
  • Centralized content-management: edit.mysite.com/en, edit.mysite.com/es, edit.mysite.com/es-es, ...
Question:
how to create a site with 2 Spanish versions: one for the international targetting site and the other one for the spanish site?
Answer:
enable the "Show country-specific language variants" checkbox on Plone's language control panel
Question:
how to create a site in English for Mexico? Does "English (Mexico)" (en-mx) exist?
Answer:
no, it does not exist.
But we can create a language for you
Patch plone.i18n to extend the language variant vocabulary.
We created: en-mx, en-fr, ru-kz
Question:
OK, now we want to serve this site from several domains, but some domains should serve only some languages
Answer:
Let's use collective.linguadomains

collective.linguadomains configuration







collective.linguadomains is great!
  • It creates redirects for incorrect site-language combinations: mysite.fr/es -> mysite.com/es
  • You need to manualy override the language-selector viewlet if you want to show links instead of redirects
  • The same for the language-alternate viewlet

language selector with full domain URLs








language alternate viewlet with full domain URLs
guidelines by Google






Question:
can we create a new language-country pair but based on the existing content?
Answer:
Yes! Use our language copier!
http://github.com/codesyntax/cs.linguacopier
Question:
Can you do content-management for us? We will provide the content on different languages
Answer:
Yes. We are going to use XLIFF to handle the translations.

            
              Cannot find the file.
              Fichier non trouvé.
            
              

slc.xliff

  • XLIFF integration for Plone
  • Both for importing and exporting
  • Both for Archetypes and Dexterity
  • One trans-unit per field
Question:
but what can we do with images or files linked from the translated HTML content?
Answer:
use plone.outputfilters

Override the ResolveUIDAndCaptionFilter to check if proper language content was inserted

















To sum up

  • Plone is perfect for multilingual content sites
  • It's easy to build powerful multi-site, multi-language sites
  • There are a lot of useful addons on the collective, just browse!
  • Pay attention to language-change URLs
  • Have Google in mind: redirects, proper language codes, alternate content links, ...

Example sites

Questions?