Skip to main content

Dexterity behavior for enabling multilingual extensions

Project description

plone.multilingualbehavior adds multilingual behavior to content types built with Dexterity. It uses the next generation multilingual engine powered by five/Zope3 technologies, plone.multilingual.

This is for Plone 4 only. For Plone 5, use plone.app.multilingual directly.

The behavior provides the Dexterity-driven content with a marker interface “ITranslatable”, and makes available to that translation enabled type all the translation UI components such as menus, views, etc…

To make your Dexterity content type translatable, add the following line to the behaviors property in your type’s profile:

<property name="behaviors">
    <element value="plone.multilingualbehavior.interfaces.IDexterityTranslatable" />
</property>

plone.multilingualbehavior implements language independent fields. The content of language independent fields is the same across all language versions. This is convenient, but also a little dangerous, because editing the field on any language version will change the content on all other language versions.

For details on how to make fields language independent, see the examples in the tests folder. tests/schemata.py shows how to make fields language independent when using the Grok framework; tests/samplecontent_type.xml shows how to achieve the same thing in an xml file. It is also possible to set a field to be language independent through the web, given a sufficiently new version of plone.schemaeditor.

For more information, please visit: https://github.com/plone/plone.app.multilingual

Please report any bugs or feature requests to our issue tracker.

Dependencies

Contributors

Changelog

1.2.3 (2019-12-27)

  • Made the __name__ method of the handler a property. Otherwise you get a very weird name with ‘bound method’ in it. [maurits]

1.2.2 (2019-12-24)

  • Add uninstall step. [bsuttor]

  • __name__ method is added for preventing bug when you try to go in Components tab into ZMI (/manage_components) or when you try to make a snapshot. [bsuttor]

  • Add uninstall profile. [bsuttor]

1.2.1 (2014-05-23)

  • Use the more specific IEditFinishedEvent rather than IObjectModifiedEvent for copying over language independent fields, since IObjectModifiedEvent can be thrown multiple times, causing a performace lag [pysailor]

1.2 - 2013-09-24

  • Check property bypass_languageindependent_field_permission_check exists in registry to allow usage with lrf-branch. [saily]

  • Rewrite handle_modified subscriber to notify ObjectModifiedEvent, and pass canonical object as event-description. This replaces the non-working semaphore. Fixes #65 [saily]

  • Switch to a cloned user with a global Editor role to allow synchronization of language independant fields of other object (which the current user could not have permission to) when modifying an object. Fixes #66 [saily]

  • We may need to know the language from a object that is not ITranslatable [ramon]

1.1 - 2013-06-19

  • Minor PEP8 errors [ramon]

1.0 - 2013-04-16

  • Removing ITG usage to ITranslationManager [pysailor]

  • Added a test for adding multilingual behavior through the web [pysailor]

1.0rc1 - 2013-01-26

  • Adding relationfield to test profile [ramon]

  • PEP8 cleanup [saily]

  • Correct import and add new dependency for plone.supermodel.model because plone.directives.form 2.0 does no longer depend on grok. [saily]

1.0b3 - 2012-10-04

  • Added tests [sneridagh]

  • Cleaning subscribers [ramon]

1.0b2 - 2012-7-9

  • Enable Realtedfields copying the correct translated item when is language independent [ramon]

  • Handle case of behaviors where attributes have never been set [do3cc]

1.0b1 - 2012-4-3

  • Schema editor plugin to enable language indepedent fields TTW [ramon]

  • Language independent field implementation [ramon]

  • Supermodel, grok and native language independent field markers [ramon]

  • ILanguage implementation [awello]

Project details


Download files

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

Source Distribution

plone.multilingualbehavior-1.2.3.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

plone.multilingualbehavior-1.2.3-py2-none-any.whl (35.4 kB view details)

Uploaded Python 2

File details

Details for the file plone.multilingualbehavior-1.2.3.tar.gz.

File metadata

  • Download URL: plone.multilingualbehavior-1.2.3.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/2.7.16

File hashes

Hashes for plone.multilingualbehavior-1.2.3.tar.gz
Algorithm Hash digest
SHA256 c15de847b15e716a64c0de8f1a9c03a4126b52205718baae82a5e4e881ba7c4d
MD5 f7aa436f589da9bf1939206bd6e89c10
BLAKE2b-256 5ce29c3264d0e8e133815d879966fcd5b9703ea6f5c8488bc93e28b5eb540921

See more details on using hashes here.

File details

Details for the file plone.multilingualbehavior-1.2.3-py2-none-any.whl.

File metadata

  • Download URL: plone.multilingualbehavior-1.2.3-py2-none-any.whl
  • Upload date:
  • Size: 35.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/2.7.16

File hashes

Hashes for plone.multilingualbehavior-1.2.3-py2-none-any.whl
Algorithm Hash digest
SHA256 b2ce12c28267746bb4d23fba401cf55cf264fc96e324872fc6c384a5bcc59952
MD5 b598425960cb14e59e3b730662d9e857
BLAKE2b-256 1ed742faa85d33cb011532c083c00ad355750f1ed09ecd6e4b660d2b73c33906

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page