Archetypes keyword widget with multilanguage support
Project description
Introduction
This addon is an archetypes multilingual keyword widget for Plone.
How to use
As any widget for Archetypes:
from Products.Archetypes.atapi from archetypes.linguakeywordwidget.widget import LinguaKeywordWidget atapi.Schema(( atapi.LinesField('subject', multiValued=1, accessor="Subject", widget=LinguaKeywordWidget()), ))
How it works
Keywords are stored in catalog but prefixes with language code before write and unprefixed before display. It means if you have widget / viewlet /view that access to data you must first remove language that way:
keywords = context.Subject() linguakeywords = [] language = context.Language() for keyword in value: if keyword.startswith('%s-' % language): linguakeywords.append(keyword[len(language) + 1:]) else: linguakeywords.append(keyword) return linguakeywords
redomino.keywordalias
keywordalias achieve same goal in a different way. With keyword alias your keywords are translated in backoffice. With linguakeywords you have just different keywords.
Credits
Companies
People
JeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>
Changelog
1.0 (2012-11-02)
Fix issue when no keyword exists and no one is added by the user
1.0a3 (2012-07-10)
Fix issue on collectKeywords
1.0a2 (2012-05-22)
remove span log in edit mode
1.0a1 (2012-05-22)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for archetypes.linguakeywordwidget-1.0.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | 535b3eb2ce1585512383a28f2cfe43feae6a792aa341c814b73a82db204054f5 |
|
MD5 | a7cf77858495a563d42b9ed341832aa8 |
|
BLAKE2b-256 | 30fbff00ab4dbac480c9e743e9e36251d44041ba854c963430815e78c05418a3 |