WordPress 和 RTL [英] Wordpress and RTL

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

问题描述

WordPress 是如此强大......但它对于像阿拉伯语和希伯来语这样的 RTL 语言来说却是如此的弱......我需要有阿拉伯语的前端和管理区域才能保持英语,当然还有 LTR ..如果我使用阿拉伯语版本的 WordPress.包括管理区域在内的所有内容都将使用阿拉伯语和 RTL.这根本不合适.在同一时间.以视觉方式编辑阿拉伯语帖子应该在 RTL 中,而 HTML 视图应该是 LTR..

WordPress is so powerful.. but yet it is so weak with RTL Languages like Arabic and Hebrew... I need to have the Front-End in Arabic and Admin area to stay in English and of course LTR.. If I use the Arabic version of WordPress. Everything including the admin area will be in Arabic and RTL. which will not be suitable at all. In the same time. Visually editing an Arabic post should be in RTL while the HTML view should be LTR..

我可以看到 wordpress.com 上的 MU 版本可以有英文管理区域,而前端是阿拉伯语.

I can see that MU version on wordpress.com can have admin area in English while the frontend is in Arabic.

怎么做?

推荐答案

WordPress 的后端可以很好地处理阿拉伯语,包括编辑器和数据库本身.如果您希望前端以阿拉伯语显示,您需要使用/开发一个使用阿拉伯语的主题.

WordPress's back end can handle Arabic just fine, with both the editor and the database itself. If you want the front end to display in Arabic you'll need to use/develop a theme that uses Arabic.

如果您的博客仅支持阿拉伯语,您可以向博客模板文件中帖子周围的 div 添加一个 CSS 类,将文本方向设置为 ltr.如果您使用阿拉伯语和英语,您可以设置一个 if 语句,根据您从后端添加到帖子的自定义字段来决定每个帖子需要的方向.

If your blog is Arabic-only, you can add a CSS class to the div surrounding the post in the blog template file that sets the text-direction to ltr. If you use Arabic and English, you can set an if statement to decide what direction each post needs to be based on a custom field you add to the post from the back end.

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

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