Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Multilangual sites with Kotti

Project Description

Multilingual Sites with Kotti.

Kotti’s data model includes a language attribute on the Content class, from which all content types inherit. However, this attribute is neither exposed by Kotti’s UI, nor used in any other way. kotti_multilingual provides a generic approach to build multilingual sites.

Work in Progress

kotti_multilingual is still in an early stage of development. It is neither feature complete nor can be considered API stable. Things will change!

Features

The package contains a single content type LanguageRoot which is supposed to be the container of all content in a specific language. All content that is created in (or moved into) such a subtree will be automatically tagged with the language of the root. This is done by subscribing to Kotti’s ObjectInsert and ObjectUpdate events.

You can place LanguageRoot instances wherever you want in your content tree, but it is considered best practice to have a tree structure like this:

- /            Document        language neutral
   - /en       LanguageRoot    English
   - /de       LanguageRoot    German
   - /nl       LanguageRoot    Dutch
   - /images   Document        language neutral

Setup

To activate the kotti_multilingual add-on in your Kotti site, you need to add an entry to the kotti.configurators setting in your Paste Deploy config. If you don’t have a kotti.configurators option, add one. The added entry should look like this:

kotti.configurators = kotti_multilingual.kotti_configure

You can register an optional kotti_multilingual.blacklist with the list of the type names not handled by kotti_multilingual.

Tests

The test setup requires additional steps:

$ virtualenv --no-site-packages .
$ source bin/activate
$ pip install -r requirements.txt
$ python setup.py develop
$ python setup.py dev

How to launch tests:

$ py.test

Changelog

0.2a3 (2015-04-27)

  • Fixed 0.2a2 version (still wrong MANIFEST.in)

0.2a2 (2015-04-27)

  • Fixed MANIFEST.in file

0.2a1 (2015-04-27)

  • Maintain translation links between content items, with translation source and targets.

  • Add a translation dropdown UI for adding a translation of an item.

  • Added widget.i10n_widget_factory deferred widget. Turns field into readonly mode if the context is a translation.

    This deferred widget is also compatible with add forms, you should bind an addform property to True and the widget will be rendered as usual in edit mode. You can do that adding a get_bind_data method on your add form.

  • Added a kotti_multilingual.blacklist setting with a list of type names not translatable

  • Changed policy for translate action. Now the translated document is automatically filled with the parent translation (enhanced usability since we don’t have the screen splitted in two parts like LinguaPlone). This is possible thanks to a change in sqla.py since we don’t set language independent attributes on translated documents

  • Fixed translation of objects with not nullable fields

  • Added support for sqlalchemy’s association_proxy

  • Fixed intermittent problem with get_source (integrity error)

0.1a3 - 2013-05-08

  • Rename LanguageSection to LanguageRoot to better fit Kotti’s INavigationRoot. This implies a change in the DB schema for which no automatic schema migration is available; you’ll have to rename the table language_sections to language_roots yourself.
  • Add some tests.

0.1a2 - 2013-05-07

  • Removed a lot of code that’s now replaced by Kotti’s INavigationRoot / TemplateAPI.navigation_root. This greatly simplifies the setup of kotti_multilingua.
  • Depend on Kotti>=0.9a3dev (needed for the above).

0.1a1 - 2013-05-06

  • Initial release.
Release History

Release History

This version
History Node

0.2a3

History Node

0.2a2

History Node

0.2a1

History Node

0.1a3

History Node

0.1a2

History Node

0.1a1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
kotti_multilingual-0.2a3.tar.gz (16.1 kB) Copy SHA256 Checksum SHA256 Source Apr 27, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting