I am testing out the translation function. It works amazingly in terms of quality and speed, so we are just one step away from implementing it on our website(s).
The only catch is that I am a bit worried about the machine translation cost.
If the translations are cached, I think the cost will be much less, but still, the cached translation should be stored not by the full page html but by topic/comment, otherwise, if the thread continues to grow, the translation has to grow as well, replacing the old ones.
So, my question is, how is the cached translation handled?
Translations are stored in tables, not cached per se.
If you have data explorer, you may use a query like such to view the stored translations (there are topic_localizations, post_localizations, category_localizations, replace accordingly).
select * from topic_localizations
limit 10
Discourse uses terms like topics, posts, and such (this might be useful). A topic has a title and has posts. This reply itself is a post. We do not store just one translation per full topic. So for example in this topic we have: