ore-ero icon indicating copy to clipboard operation
ore-ero copied to clipboard

Automate translations of fields value

Open fredericlestage-vdm opened this issue 5 years ago • 9 comments

The idea is to find a way to not oblige users to add both french and english values to a field when they fill the form. They would instead only have to fill the form in their current language (english OR french). We'd still give them the option to do both if they're familiar with both languages. However, if it could be great if we could find a solution for creating an automatic translation when it's not the case.

fredericlestage-vdm avatar Jul 22 '19 20:07 fredericlestage-vdm

I'm not sure about any requirements for this solution, either being open-source and/or being free?

fredericlestage-vdm avatar Jul 22 '19 20:07 fredericlestage-vdm

From my preliminary research, what I found wasn't really conclusive. Most open source solutions seems to be only free up to a certain amount of character translated. Even the non-open source (like google translate api) has a price per usage.

fredericlestage-vdm avatar Jul 22 '19 20:07 fredericlestage-vdm

@smellems @imadeDev @BassamAjam @j-rewerts Any thoughts?

fredericlestage-vdm avatar Jul 22 '19 20:07 fredericlestage-vdm

Some of the solutions I found:

  • Google Translate Api
  • Microsoft Translator Text API
  • Yandex translator
  • Serge.io
  • Systran

But none of them seems to meet our requirements

fredericlestage-vdm avatar Jul 22 '19 20:07 fredericlestage-vdm

I imagine we keep both fields (en-fr) but have a button to do an automatic translation to the other language.

We could use Termium if it have an API. I think that's what GCconnex is using.

https://www.btb.termiumplus.gc.ca/tpv2alpha/alpha-eng.html

smellems avatar Jul 24 '19 17:07 smellems

Possibly related: we set up automated translation for open data metadata that was federated from the Alberta open data portal using deepl.com. Internally and via API all our language metadata is tagged with BCP-47 labels so we used its extension to indicate "translated fields" i.e. fr-t-en for French text machine translated from English vs. fr for original French text.

On the web site we indicate these translations with little icons on the titles, descriptions and keywords, e.g. https://ouvert.canada.ca/data/fr/dataset/18801116-2014-43df-84fd-408bc2382051

wardi avatar Jul 26 '19 14:07 wardi

@wardi I've look at the API and it would seem like a solution we could adopt. However, I'd like to know if there's already a setup for the API for Canada or do you only have your personal/Alberta setup?

fredericlestage-vdm avatar Jul 26 '19 14:07 fredericlestage-vdm

Do you mean the deepl API? We use a few simple scripts https://github.com/open-data/ckanext-canada/tree/master/bin/harvest

wardi avatar Jul 26 '19 18:07 wardi

I guess my question is could we use it for our project to automatically translate fields after a user submit a form?

fredericlestage-vdm avatar Jul 31 '19 15:07 fredericlestage-vdm