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
---------
|cirb|_ CIRB / CIBG
* `Contact us <mailto:irisline@irisnet.be>`_
|makinacom|_
* `Planet Makina Corpus <http://www.makina-corpus.org>`_
* `Contact us <mailto:python@makina-corpus.org>`_
Authors
- JeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>
.. Contributors
.. |cirb| image:: http://www.cirb.irisnet.be/logo.jpg
.. _cirb: http://cirb.irisnet.be
.. _sitemap: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=183668&topic=8476&ctx=topic
.. |makinacom| image:: http://depot.makina-corpus.org/public/logo.gif
.. _makinacom: http://www.makina-corpus.com
.. _documentation: http://plone.org/documentation/kb/installing-add-ons-quick-how-to
.. _redomino.keywordalias: https://github.com/redomino/redomino.keywordalias
Changelog
=========
1.0a1 (2012-05-22)
------------------
- Initial release
============
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
---------
|cirb|_ CIRB / CIBG
* `Contact us <mailto:irisline@irisnet.be>`_
|makinacom|_
* `Planet Makina Corpus <http://www.makina-corpus.org>`_
* `Contact us <mailto:python@makina-corpus.org>`_
Authors
- JeanMichel FRANCOIS aka toutpt <toutpt@gmail.com>
.. Contributors
.. |cirb| image:: http://www.cirb.irisnet.be/logo.jpg
.. _cirb: http://cirb.irisnet.be
.. _sitemap: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=183668&topic=8476&ctx=topic
.. |makinacom| image:: http://depot.makina-corpus.org/public/logo.gif
.. _makinacom: http://www.makina-corpus.com
.. _documentation: http://plone.org/documentation/kb/installing-add-ons-quick-how-to
.. _redomino.keywordalias: https://github.com/redomino/redomino.keywordalias
Changelog
=========
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
File details
Details for the file archetypes.linguakeywordwidget-1.0a1.zip.
File metadata
- Download URL: archetypes.linguakeywordwidget-1.0a1.zip
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079addce0aa90042bb62b307366a797f4fc1f2cebfd3cce50fdcbd23a1a64c6d
|
|
| MD5 |
526a6bb570c1113d2ad5e224e1924e6a
|
|
| BLAKE2b-256 |
177bb3048877004cbf3f8037b1491f08aaedd80a38c997e1ce6e67e720b4ce76
|