No project description provided
Project description
ckanext-duo
Translate dataset/organization/group titles and descriptions using custom <field>_<locale>
fields.
Requirements
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.9 | yes |
Installation
To install ckanext-duo:
-
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
-
Clone the source and install it on the virtualenv
pip install ckanext-duo
-
Add
duo duo_dataset duo_organization duo_group
to theckan.plugins
setting in your CKAN config file. -
Make sure you have non-empty
ckan.locale_default
andckan.locales_offered
options inside CKAN config file. -
Restart CKAN.
How to use
Depending on entity that must be translated(group, dataset, organization), one must update corresponding metadata schema. Following fields must be added:
- organization/group
title_<locale>
(ex.,title_ar
)description_<locale>
(ex.,description_ar
)
- dataset
title_<locale>
(ex.,title_ar
)notes_<locale>
(ex.,notes_ar
)
If you are using ckanext-scheming, define field like this::
...
{
"field_name": "title_ar",
"label": "Arabic Name",
"validators": "if_empty_same_as(title)"
},
...
Or you can define custom fields using low-level IDatasetForm
/IGroupForm
/IOrganizationForm
.
If none of above is possible, provide an extra field via CKAN extras(key/value pairs of fields in the very bottom of dataset/group/organization form).
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
Built Distribution
Hashes for ckanext_duo-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22fd3c88e6c2424351dc733ebb1091a4e1b07fb976abe18428cfe8124b111ec0 |
|
MD5 | 78bda67517a50a83ca6d337c57a94a6e |
|
BLAKE2b-256 | 771e975af14f30b0009b2c27312651bafe095552b11988cd3a81987f9a798737 |