keithkhl is exploring Discourse’s translation function and is concerned about machine translation costs. They inquire about how cached translations are handled, suggesting that caching by topic or comment would be more efficient than by full page HTML. nat clarifies that translations are stored in tables, not cached, and provides details on how translations are managed for topics and posts. They explain that each component (topic title, individual posts) has its own translation, and share a SQL query to view stored translations.
אני בודק את פונקציית התרגום. היא עובדת מדהים מבחינת איכות ומהירות, כך שאנחנו רק צעד אחד מהטמעה באתרים שלנו.
הבעיה היחידה היא שאני קצת מודאג לגבי עלות התרגום הממוחשב.
אם התרגומים נשמרים במטמון, אני חושב שהעלות תהיה הרבה פחותה, אבל עדיין, התרגום השמור במטמון צריך להיות מאוחסן לא לפי ה-html אלא לפי נושא/הערה, אחרת, אם השרשור ממשיך לגדול, התרגום יצטרך לגדול באופן קבוע.
לכן, השאלה שלי היא, כיצד מטופל התרגום השמור במטמון?
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: