WordPress和RTL [英] Wordpress and RTL

查看:98
本文介绍了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天全站免登陆