Yoav Farhi: Right to Left WordPress

Published

May 1, 2010

Are you developing a WordPress theme? Yoav Farhi from Automattic teaches you the basics of right-to-left language support in seven minutes in this lightning session.

Video provided by Blaze Streaming Media.

Rate this:

Event

WordCamp San Francisco 2010 19

Speakers

Yoav Farhi 2

Tags

Automattician 33
development 164
Featured 186
i18n 7
right to left 1
RTL 1
Themes 93

Language

English 1856

Download
MP4: Low, Med, High
OGG: Low
Subtitles
Subtitle this video →

14 Responses to “Yoav Farhi: Right to Left WordPress”

  1. Ira

    Is this also available as test somewhere, with examples one can cut and paste?

  2. Ira

    תודה יואב, מצאתי בינתיים :-)

  3. Ofer

    Hello,

    Any simple way to check that the rtl.css is there and make the theme include it? As I am coding a translation plugin with rtl support.

    • Yoav

      WordPress will automatically load the rtl.css if the blog is set to a RTL language (i.e. Hebrew)

      • Ofer

        I understand it will, but I want to force it to believe that it is set to RTL, take a look at my plugin site to understand why (mainly language switch)

        • Ira

          I’ll explain what I need as well, and I think what offer refers to – if one wants to build a multilingual blog, where some of the pages are going RTL and some LTR, what are the appropriate “buttons to press” to override this, so whatever calls “get_bloginfo( ‘text_direction’ )” may get a different answer based on some logic running at the theme level.

      • Yoav

        Setting the global $text_direction value should work.
        Take a look at the WPML plugin, it’s already doing that.

  4. Ofer

    I guess you know the microsoft/ibm joke with the plane

    anyhow – did you mean?

    global $wp_locale;
    $wp_locale->text_direction = 'rtl';

  5. Ofer

    Thanks for your help; the latest transposh plugin (0.6.1) now supports this feature.

  6. Dan Lavie

    I must say that Indeed the Transposh plugin for WordPress does a great job ‘converting’ almost any theme into a Hebrew/RTL version, plus the convenience of auto translation with the great ability to correct those translated pages after the initial google translate.

    Transposh is a must for anyone that need a quick multilingual wordpress website.

  7. Ira

    Hey Ayzee,

    Sorry, but there’s no buil-in support for that. there are one or two plugins out there that I was never able to wrangle well. for the two blogs I’ve built that have the ocassional odd directionality (one is LTR with occasional RTL, the other default RTL with occasional LTR), I used a category (though you can use a tag) that denotes that the post is of a different directionality, then there will be a php condition in the theme code to set the directionality of the post container based on that metadata. it’s somewhat of an ugly hack, but it works well. it won’t translate your language, of course. the remark boxes and their titles of “Name”, “Mail”, “Url” will still be in the main language unless you add more switches, and the code becomes ugly.

Continue the discussion

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 11,305 other followers

%d bloggers like this: