How can I input a single right-to-left paragraph (Hebrew) into an English page/post?

I have an English blog. In one of the pages I want to include a Hebrew paragraph between two English paragraphs (I expect the English text to be left-aligned and the Hebrew text to be right-aligned). I can get the Hebrew text to be right aligned, but not in a right-to-left way (e.g. the period at the end of the sentence appears to it’s right instead of its left).

I tried pasting formatted text from Microsoft Word, but it doesn’t work (the pasted text changes from right-to-left as it was in Word to the screwed-up form I get on WordPress if I type it myself).

Read More

I do not want the admin interface to change, I do not want my entire blog to change to right-to-left. Only a paragraph.

How can I achieve that?
The site is http://roee.co

Related posts

Leave a Reply

1 comment

  1. You can add a hebrew shortcode to wrap around your hebrew text and then use the CSS2 direction attribute to indicate the text direction.

    e.g.:

    In your themes functions.php:

    function hebrew_shortcode( $atts, $content = null ) {
       return '<p lang="he" DIR="RTL">' . $content . '</p>';
    }
    add_shortcode( 'hebrew', 'hebrew_shortcode' );
    

    Your content:

    [hebrew]Hebrew styled right to left text![/hebrew]

    edit: I’ve updated to use the dir html attribute ( spec docs said do nto sue css to indicate right to left ) and to use a p element instead