Using DeepL-API for translation of website in combination with TCMS...: Possible?

Would it be possible to translate TCMS-generated website content using the DeepL API? My client wants to translate german content, which has been created with TCMS using the DeepL API.
https://www.deepl.com/en/pro-api

The API would fetch the german text from the cms-data folder, translate it and then write it back to another location inside the cms-data folder. This translated text would then have to be shown on the website. I don't think that this is possible but want to ask here nevertheless.
Each translation with the DeepL API costs money. To reduce these costs the translated text would have to be stored inside the cms-data folder (and not be translated on the fly each time the page is opened) and only be generated/updated if the german original text would have changed.

Hm, but how would TCMS know which text to display for each language. Since the translated texts - generated by DeepL - are not written by TCMS I fear that TCMS has no idea that this text exists. Could it eventually work if I prepare the text fields for each language (so that these text snippets actually exist in the cms-data folder on the server) and then let DeepL write the translated text to these files?

Phew..., that's quite a complex topic, right? But I really want to give my client an answer if this translation scenario could work or if not. Any idea, especially Joe Workman ...? Could eventually TCMS 2 handle this scenario?

4 replies