Google 从 MySQL 数据库即时翻译

发布于 2025-01-06 19:50:50 字数 369 浏览 2 评论 0原文

希望以前有人这样做过,因为我的搜索没有得到任何结果。

我正在构建的网站有两种语言集:西班牙语和英语。该网站有两个不同的域名(尚未购买),一个适用于西班牙语用户,另一个适用于英语用户。

如果用户访问西班牙语域,则假定他/她发布的所有内容主要是西班牙语。因此,在英语域下访问该网站的英语用户将看到西班牙人的文本翻译成英语。对于英语到西班牙语,反之亦然。

我发现谷歌翻译是最好的,它不会改变非母语。

我的问题是,我无法在每篇非导航域母语的帖子上提供“翻译”链接。我从我的数据库中知道哪些条目是西班牙语/英语,我需要在页面加载后立即通过 javascript 使用 Google 来翻译它们。

我希望有人已经完成了他的工作。

干杯克雷格

Hoping someone has done this before as my searches aren't coming up with anything.

The website I am building has two language sets, Spanish and English. The site has two different domain names (Not bought yet) one for Spanish speakers another for English speakers.

If a user goes to the Spanish domain everything he/she posts is assumed to be primarily in Spanish. So English speaking users that visit the site under the English domain will see that Spanish persons text translated to English. And vice versa for English to Spanish.

Google translate I have found to be the best and it doesn't change non-native language.

My issue is I can't have the "Translate" link on every post that is not in the native language of the navigated domain. I know from my DB which entries are Spanish/English, I need to utilize Google via javascript to translate them as soon as the page has loaded.

I'm hoping someone has done his already.

cheers craig

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文