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 LanguageSection 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 section. This is done by subscribing to Kotti’s ObjectInsert``and ``ObjectUpdate events.

The package also extends Kotti’s TemplateAPI with an additional language_root attribute that can be used as the navigation root for the currently selected language. The included language_nav.pt template makes use of that attribute.

You can place LanguageSection 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       LanguageSection     English
   - /de       LanguageSection     German
   - /nl       LanguageSection     Dutch
   - /images   Document            language neutral

Setup

To activate the kotti_multilingual add-on in your Kotti site, you need to add one or more entries to the kotti.configurators setting in your Paste Deploy config. If you don’t have a kotti.configurators option, add one.

You must always add (enables content type(s) and event subscribers):

kotti.configurators = kotti_multilingual.kotti_configure

You most likely will want to also enable the TemplateAPI extensions for kotti_multilingual:

kotti.configurators = kotti_multilingual.kotti_configure_template_api

The one exception when you don’t want this is if you already have a custom TemplateAPI in your project. In this case your class should inherit from kotti_multilingual.views.util.TemplateAPI.

To use the template overrides (most notably the language aware navigation bar with included language switcher) also add:

kotti.configurators = kotti_multilingual.kotti_configure_template_overrides

If unsure (or you just want to test drive kotti_multilingual) add all of the above.

Changelog

0.1a1 - 2013-05-06

  • Initial release.

Metadata

Release files for kotti_multilingual 0.1a1

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.1a1
File Size Uploaded
kotti_multilingual-0.1a1.tar.gz 8.8 kB Details

Release files / kotti_multilingual-0.1a1.tar.gz

Download URL kotti_multilingual-0.1a1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2aaca912d8b224d94c0754a5e797c2aeb684a5553f08f08a097632b00ec2dbc5
BLAKE2b-256 checksum
How to use checksums
c1c70315a4109e62143a5cd0a7f902d1d32f6edf4a4174fd2a4acc788abd35e6
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