Drupal:如何更改当前的分类语言

发布于 2024-10-09 16:21:42 字数 183 浏览 12 评论 0原文

我有一个英文 Drupal 站点,其中包含节点和节点等内容。英语分类法。现在我想将所有内容转换为西班牙语。我也想保留英文内容。

对于分类翻译,我安装了 Locale 和 i18n 模块。我搜索了所有分类法并添加了他们的西班牙语翻译。但是,当我将网站的默认语言切换为西班牙语时,分类法继续以英语显示。

有什么想法或建议吗?

I have a Drupal site in English which has content i.e. nodes & taxonomy in English. Now I want to convert all content to Spanish. I want to retain the English content as well.

For taxonomy translation, I installed Locale and i18n module. I searched all taxonomy and added their Spanish translation. However, when I switch the default language of site to Spanish, the taxonomy continue to show up in English.

Any ideas or suggestion?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半世晨晓 2024-10-16 16:21:43

要翻译分类术语,您应该使用分类翻译模块(国际化包的一部分)。分类词汇及其术语有三种翻译模式。如果您想保留相同的术语但翻译其标题(和描述),则应将词汇表模式设置为本地化术语。执行此操作时,请使用站点默认语言(在您的情况下可能是英语)输入每个术语。然后,使用翻译字符串界面,您可以提供翻译。

请查看多语言分类手册页面了解更多信息。

分类翻译模块应该处理标准术语显示,以便它们使用翻译。如果您需要在某些自定义代码中检索术语的名称和描述以进行输出,则必须使用 i18ntaxonomy_localize_terms< /code>获取翻译。将术语的名称或描述传递给 l() 不起作用。

To translate taxonomy terms you should use the Taxonomy translation module (part of the Internationalization package). There are three translation mode for taxonony vocabularies and their terms. If you want to keep the same terms but translate their titles (and description), you should set your vocabulary mode to Localize terms. When doing this, enter each term in the site default language (probably Egnlish in your case). Then, using the translate strings interface, you can provide translations.

Check the Multilingual Taxonomy handbook page for more information.

The Taxonomy translation module should handle standard term displays so they will use translations. If you need to retrieve a term's name and description for output in some custom code, you will have to use i18ntaxonomy_localize_terms to get the translations. Passing the term's name or description to l() won't work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文