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.1 (2013-01-16)
Add a workaround to make collectKeyword script support field added with schemaextender.
Rename the collectKeyword script to getLinguaKeywords to not conflict existings instance
Add tests
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
Metadata
Release files for archetypes.linguakeywordwidget 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| archetypes.linguakeywordwidget-1.1.zip | 30.3 kB | Without provenance | Details for archetypes.linguakeywordwidget-1.1.zip |
Release files / archetypes.linguakeywordwidget-1.1.zip
| Download URL | archetypes.linguakeywordwidget-1.1.zip |
|---|---|
| Size | 30.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aee09b1c788ebfcd68fd3446c00fef2e595f0d3b62a7052be0944d72fab71efa
|
|
BLAKE2b-256 checksum How to use checksums |
22133db6fefb31b983d1a9897c1170eb2d541de81e1c7126caccd8ac3ddf8f6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for archetypes.linguakeywordwidget 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.