WordPress多语言插件 [英] Wordpress multilanguage plugin

查看:113
本文介绍了WordPress多语言插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Wordpress上有一个博客,我需要在其中提供几种不同语言的内容.我不想翻译文章,我只想在每种语言中都有一些文章,而只想在它们之间进行切换.我一直在寻找可以使用这种功能的wordpress插件,但到目前为止,我只发现了 xLanguage ,但这不是什么我打算将if用于,尽管它非常接近.

I have a blog on Wordpress in which I need to serve contents in several different languages. I don't want to translate the articles, I just want to have some in each of the languages and just have a way of switching between them. I was looking for a wordpress plugin that allows such functionality but so far I found only xLanguage but it's not what I intend to use if for, although it's pretty close.

此插件允许在帖子中包含针对一种特定语言进行本地化的内容,而不会以其他语言显示.但是它的主要缺陷是

What this plugin allows is to have a contents in the post that is localized for one specific language and it's not displayed in other languages. However it's main flaws are

  • 您不能翻译帖子标题
  • 如果我仅使用网站支持的某些语言来定义帖子,则该帖子将显示为空白(我希望该语言完全不会出现)

有人知道我是否可以使用一个插件,还是应该开始考虑自己开发一个插件.正如我提到的那样,我实际上并不需要翻译功能,只需将帖子标记为仅以一种选定的语言显示即可.

Does anyone knows if there is a plugin that I could use or I should start thinking of developing one myself. As I mentioned I don't really need a translation functionality, just the ability to mark the post to appear in only one selected language.

我想我还可以设置几个wordpress实例,每个实例针对每种语言,但是我将需要在所有实例中复制每个配置更改,这是我真的要避免的事情.

I guess I could also set up several instances of wordpress, each for every language but then I will need to replicate every configuration change in all the instances and that's something I would really like to avoid.

实际上,我只是注意到可以通过在options中指定一个参数来隐藏未翻译的消息,但是仍然存在一个问题.

Actually I just noticed that I can hide untranslated messages by specifying a parameter in options but there is still one problem.

页面的其余部分(链接,Wordpress生成的其他文本)在切换页面时不会得到翻译.所以我的内容经过翻译后仍然在导航等中看到默认语言.

The rest of the page (links, other text generated by Wordpress) doesn't get translated while switching the page. So I have my contents translated by still see default language in navigation etc.

推荐答案

Gengo看起来很有趣,但是开发似乎已经停止.

Gengo looked interesting, but development seems to have stopped.

但是qtranslate插件(作者页面

But the qtranslate plugin (author's page, plugin page) offers the things you need. It not only manages article translations but also switches the complete site (“user interface”) language.

文章(包括标题)可以用几种语言存储.如果您需要其他地方的翻译(即小部件标题),则可以使用特殊标记(语言标记):<!--:en-->english<!--:--><!--:de-->Deutsch<!--:-->

Articles (including titles) can be stored in several languages. If you need a translation elsewhere (i.e. a widget title), you can use special markup (language tags): <!--:en-->english<!--:--><!--:de-->Deutsch<!--:-->

我仍在自己测试它,但是它基本上可以正常工作.可能会感到惊讶(例如日期字段),因此最好在您网站的离线副本上对其进行测试.

I'm still testing it myself, but it mostly works alright. There may be surprised (e.g. date fields), so better test it on a offline copy of your site.

此外,请检查这个较旧的 stackoverflow问题

Also, check this older stackoverflow question

这篇关于WordPress多语言插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆