Wordpress +多语言插件(qtranslate)切换语言时不会显示翻译
我使用多语言插件(qTranslate)遇到的问题是,当我尝试切换帖子语言时,它不会切换到另一种语言,它给我404。
这可能是以下任一原因造成的:
* WordPress is installed in a directory (not root) and you're using default links.
* URL rewriting is not enabled in your web server.
* The web server cannot write to the .htaccess file
我的 htaccess 文件的编号为 644,其中包含以下代码:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
我正在使用自定义永久链接结构: /%category%/%postname%/
但是我尝试切换语言时仍然出现 404。 有人知道还有什么可能影响翻译插件吗?
the problem I have with the multilingual plugin (qTranslate), is that it won't switch to another language it gives me 404 when trying to switch the language of posts.
This can be a result of either:
* WordPress is installed in a directory (not root) and you're using default links.
* URL rewriting is not enabled in your web server.
* The web server cannot write to the .htaccess file
I have my htaccess file with 644 and the following code is in there:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
And I'm using a custom permalinks structure: /%category%/%postname%/
but I still have 404 when trying to switch language.
anybody knows what else could be adffecting the translation plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道这是否有帮助,但我遇到了类似的问题,仅与搜索结果有关。使用 get 方法,对于主要语言来说工作得很好,但是英语产生了 404,使用方法 post 英语,而德语则进入主页。
然后我将 wp 常规设置中的 url 从 abc.com/def 更改为 abc.com (我在两个字段中都有该目录,并将其从两个字段中删除)。 wp 不在 www 中,但 www 目录被重定向到 wp 文件夹。所以子目录不再是必要的(如果它用于开发)。而且,不知道为什么,但在此之后,后方法搜索工作得很好,就像 wp 论坛中描述的那样( http://www.qianqin.de/qtranslate/forum/ )在这里您可以找到许多有关 qtranslate 问题的有用提示。还应用 gettext 可能会有所帮助: http: //www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=294&sid=5be0c994e226ab99b5bed7c28a250bab
希望这有帮助。
i don't know if this can help, but i had a kind of similar issue, only with the search results. with method get it was working fine for the main language, but english made 404, with method post for english, and german went to the home-page.
then i changed the url in the wp general settings from abc.com/def to abc.com (i had the directory in both fields and removed it from both). wp is not in www, but www-directory is redirected to the wp-folder. so the subdir was not necessary anymore (had it put for development). and, don't know why, but after this, the post method-search worked well like described in the wp-forum ( http://www.qianqin.de/qtranslate/forum/ ) where you can find lots of useful tips for qtranslate issues. also applying the gettext might help: http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=294&sid=5be0c994e226ab99b5bed7c28a250bab
hope this helps.