Closed wanam closed 1 year ago
@wanam Thanks for taking the time to submit this PR. I think automated translation of datasets metadata is an interesting idea to explore but I don't think this is the right approach. Instead, I would focus on:
IPackageController.after_dataset_create()
and `IPackageController.after_dataset_update()
to run the translation process (probably in a background job)Hope this makes sense, good luck!
This feature uses Google translate free plan through deep-translator library: https://github.com/nidhaloff/deep-translator
Translation can be triggered during harvesting with "-t/--translate language" argument, where language code is ISO 639-1 which is the alpha-2 code.
Example: ckan --config=/etc/ckan/default/ckan.ini harvester gather-consumer -t fr