WordPress 中的多语言 CMS 网站
我正在开发 WordPress CMS 网站。 基本上我想要这个网站有两种不同的语言版本(比如英语和日语)。
现在要点是,我不不想使用任何本地化插件。 管理员将记录并更新两种语言的内容。
实现这项工作的最佳方法是什么?
我必须为每种语言创建两个子网站吗?或者建议我任何替代方式。
提前致谢。
I'm working on wordpress CMS website.
Basically I want this website in 2 different languages(say English and Japanese).
Now Main Point is, I DO NOT wan't to go for any Localization Plugins.
Admin will write down and update content for both languages.
What can be the best possible way to make this work?
Do I have to create two sub sites for each language? or suggest me any alternative way.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我们在更早的时候就遇到了这个问题,最终创建了两个子域并且它起作用了(例如 us.example.com 和 uk.example.com)。我们使用的 CMS 不支持 i18n...我认为,由于您使用 2 种不同的语言维护 2 个不同的站点不会给维护带来很大的开销,因为它们在各个方面都有所不同,包括网址结构。
We had this problem further back and we created two sub domains eventually and it worked (like us.example.com and uk.example.com). The CMS we were using did not support i18n...I think that since you are working with 2 different languages maintaining 2 different sites does not give that big overhead for maintenance because they differ in every way including the URL structure.
不过,您必须更清楚地选择多语言的方式。希望这会有所帮助。
1) 如果您只需要您的帖子&要手动翻译的页面使用 qTranslate 。
2)如果您需要更改所有内容,包括您的小部件和;插件比您必须使用 2 wordpress 设置或 WPML
Still you have to be more clear to choosing the way for multilingual.Hope this helps.
1) If you need just your post & pages to be get translated manually use qTranslate .
2) If you need everthing change including your widgets & plugins than you must have to use 2 wordpress setup or WPML
如果您准备编写自己的 WP 主题(并不难),您所要做的就是为每种语言使用不同的类别,然后根据检测 URL 中的语言代码类别来提取主题中的相应内容。
我喜欢从 URL 中删除类别和标签库,因此语言紧跟在域名后面。
我刚刚用英语/中文编写了一个完全自动化的网站,每件事都使用自己的语言,包括 AJAX 联系表单。不需要杂乱的插件。没有语言切换。只是一个单一的主题。在我看来,这比搞乱 WPML 之类的事情要简单得多。但您确实需要了解 PHP。
If you are up for writing your own WP theme (not that hard) all you have to do is use a different category for each language, and then pull the appropriate content in the theme, based on detecting the language code category in the URL.
I like to remove both the category and tag base from the URL, so the language follows right after the domain name.
I've just finished writing a fully automated site in English/Chinese and every single thing is in its own language, including the AJAX contact form. No messy plugins required. No language switching. Just a single theme. It is way simpler in my opinion than messing with WPML and things like that. But you do need to know PHP.
使用 WordPress 多站点安装。
use WordPress multisite install.