Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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 files for kotti_multilingual 0.2a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kotti_multilingual 0.2a3
File Size Uploaded
kotti_multilingual-0.2a3.tar.gz 16.1 kB Details

Release files / kotti_multilingual-0.2a3.tar.gz

Download URL kotti_multilingual-0.2a3.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5731bcf33569b81c6f2aa0381dbb7a53455272cecf856b9d7b0a70cc07d73162
BLAKE2b-256 checksum
How to use checksums
1278adbb724977a3eed84d894511ca1ba8da202d13cb25900bbbb33a41f6d7cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page