28
RIGHT TO LEFT WORDPRESS Yoav Farhi @yoavf [email protected]

WordPress RTL

Embed Size (px)

DESCRIPTION

My flash talk about Right To Left languages in WordPress from WordCamp San-Francisco 2010

Citation preview

Page 1: WordPress RTL

RIGHT TO LEFTWORDPRESS

Yoav Farhi@[email protected]

Page 2: WordPress RTL

العربيةעבריתעברית

فارسیفارسیاردو

ئۇيغۇرچە

Page 3: WordPress RTL
Page 4: WordPress RTL

500,000,000500,000,000(~ 7 % of the world population)(~ 7 % of the world population)

Page 5: WordPress RTL

#1#1

Page 6: WordPress RTL

#1#1

Page 7: WordPress RTL
Page 8: WordPress RTL
Page 9: WordPress RTL
Page 10: WordPress RTL

CC BY-NC-SA CC BY-NC-SA http://flickr.com/photos/mait/

Page 11: WordPress RTL

In the repository...In the repository...

Page 12: WordPress RTL

CC BY CC BY http://www.flickr.com/photos/bixentro

Page 13: WordPress RTL

rtl.cssrtl.css

Page 14: WordPress RTL

rtl.cssrtl.css• The BasicsThe Basics• Text AlignmentText Alignment• FloatsFloats• PositioningPositioning• Padding, Margin and BordersPadding, Margin and Borders• FontsFonts• BackgroundsBackgrounds

Page 15: WordPress RTL

The basicsThe basics

body { direction:rtl; unicode-bidi:embed; }

Page 16: WordPress RTL

Text AlignmentText Alignment

#footer { text-align: right;}

#footer { text-align: left;}

rtl.css

style.css

Page 17: WordPress RTL

FloatsFloats

#comment-form label { float: left; clear: right;}

#comment-form label{ float: right; clear: left; }

rtl.css

style.css

Page 18: WordPress RTL

PositioningPositioning

#logo { position: relative; left: 10px; top: 20px;}

#logo {

}

rtl.css

style.css

left: auto; right: 10px;

Page 19: WordPress RTL

The Box ModelThe Box Model

blockquote { margin-left: 10px; padding: 5px 15px 5px 0; border-left: 1px solid #000;}

blockquote {

}

rtl.css

style.css

margin-left: 0; margin-right: 10px; padding: 5px 0 5px 15px;

border-left: none; border-right: 1px solid #000;

Page 20: WordPress RTL

BackgroundsBackgrounds

#header { background: url(header.png) 0 0 no-repeat;}

#header { background-position: 100% 0;

}

rtl.css

style.css

background-image: url(header-rtl.png);

Page 21: WordPress RTL

BackgroundsBackgrounds

#header { background: url(header.png) 22px 0 no-repeat;}

#header { background-position: ??? 0;}

rtl.css

style.css

Page 22: WordPress RTL

FontsFonts

use basic sans-serif fontsuse basic sans-serif fontsno italicsno italics

Page 23: WordPress RTL

FontsFonts

h1, h2 { font-family: Georgia, serif; font-style: italic;}

h1, h2 { font-family: Arial, Helvetica, sans-serif; font-style: normal;}

rtl.css

style.css

Page 24: WordPress RTL

Basic classesBasic classes

rtl.css

style.css.alignleft { float: left;}

DonDon’’t!t!

Page 25: WordPress RTL

pluginsplugins

Page 26: WordPress RTL

pluginspluginsfunction my_plugin_css() {

if ( 'rtl' == get_bloginfo('text_direction') ) {  // RTL CSS } }

Page 27: WordPress RTL

Almost doneAlmost doneRTL Tester pluginRTL Tester plugin

CSS Janus (RTLize your css)CSS Janus (RTLize your css)

The RTL guide in the codexThe RTL guide in the codex

Page 28: WordPress RTL

Thank Thank You!You!