|
Post by account_disabled on Dec 23, 2023 1:46:48 GMT -6
内容,原因不难理解。首先,以多种语言提供内容总体上听起来是个好主意,并且总体上使您的网站对读者更加友好。其次,网络上的各种来源(例如 CSA Research)报告说,单语网站甚至无法覆盖其潜在读者群的 25%。 所有这些基本上意味着您的网站可能确实应该是多语言的。虽然在 WordPress 网站上引入多语言内容并添加语言切换器很容易(使用TranslatePress等解决方案),但瓶颈不是 WordPress 本身,而是您当前使用的主题。 如果没有可翻译的主题,您可能很难完全使用多种语言。这就是以下资源发挥作用的地方。 在其中,我们首先讨论什么是高质量的多语言 WordPress 主题,然后列出 美国数据库 市场上兑现其多语言承诺的顶级主题。 在多语言 WordPress 主题中寻找什么 一个好的多语言主题应该允许您做一些关键的事情: 首先,它应该是我们所说的“翻译就绪”。“可翻译”的主题不仅仅是开发人员使用的流行语。它实际上有一个非常具体的含义。 可翻译的主题已正确国际化(“i18n”),这意味着主题中使用的文本尚未进行硬编码,而是可以根据翻译文件的内容进行互换。 准备好翻译的主题通过 WordPress 的gettext函数显示所有字符串,这些函数从当前正在使用的翻译文件中获取输出。 翻译文件基本上是大表,其中每段原始文本都与其翻译版本链接。 每当请求特定语言时,准备翻译的主题将查找相应的翻译文件。 简化一下,我们可以说,如果一个主题不使用gettext函数,那么它就不能被认为是可翻译的。 要了解有关 WordPress 中的工作原理的更多信息,请阅读此内容。 此外,真正的多语言主题还应该支持 RTL(从右到左)文本。当然,只有当您尝试将内容翻译成阿拉伯语、阿拉姆语、乌尔都语、希伯来语或其他使用从右到左脚本的语言时,您才需要此功能。尽管如此,RTL 支持的存在是一个好兆头,表明您正在考虑的 WordPress 主题确实认真对待多语言内容。 最后,请记住,主题可翻译并不意味着它有任何特定的内置工具来使翻译工作变得容易。这仅意味着主题中有允许翻译的基础设施。您需要另一个工具来使您的网站内容完全多语言化 - 例如 TranslatePress。
|
|