This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Introduction

Caution!

This package is still in a public experimentation phase.

This package aims to provide a simple way to make some fields on a dexterity content type available in more than one language (“multilanguage”). It tries to do what raptus.multilanguagefields does for Archetypes content types.

Assumptions

  • It should be possible for a site to add a new supported language without having to migrate content. (A modification in the code for your customer-specific package would be ok.)

Usage

Multilanguage text line:

from collective.multilanguagefields.fields import TextLine as MLTextLine
from plone.supermodel import model

class IMyType(model.Schema):

    some_text = MLTextLine(
        title=_(u"Fieldname"),
        required=True,
    )

Features

Compatibility

Plone 4.3 and upwards.

Making Title field multilanguage

You cant use the default plone.app.content.interfaces.INameFromTitle behavior. Instead, use collective.multilanguagefields.interfaces.INameFromMultiLanguageTitle

In addition, your content type needs to implement its own Title() method which takes into account that the title attribute contains a dictionary. The ml_value method from utils.py might be helpful.

Using multilanguage fields in templates

You can do this as follows:

<span tal:content="context/ml_value/my_field" />

You can also specify a default value:

<span tal:define="ml_value context/ml_value"
      tal:content="python: ml_value('my_field', 'no translation found')" />

Changelog

0.7 (2016-01-22)

  • Don’t raise DefaultLanguageMissing when field is not required and no other values are given.
    [moverkamp]

0.6 (2015-01-05)

  • Nothing changed yet.

0.5 (2015-01-05)

  • Nothing changed yet.

0.4 (2015-01-05)

  • Nothing changed yet.

0.3 (2015-01-05)

  • Nothing changed yet.

0.2 (2015-01-05)

  • Nothing changed yet.

0.1.1 (2015-01-02)

  • Nothing changed yet.

0.1 (2015-01-02)

  • Initial release
Release History

Release History

0.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
collective.multilanguagefields-0.7.zip (25.5 kB) Copy SHA256 Checksum SHA256 Source Jan 22, 2016

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