..and add the class {TagsAsClasses} with the braces as below:
What this does is adding CSS classes to the post blocks dynamically according to the tags you add to your post (see where we're going with this?)- Now choose a special class for your RTL content, I chose "arabic" to tag my arabic posts for example.
- We'll need to add a custom class named
.arabicand add our RTL rules to it. While we're still in the customization page, switch to the Advanced section in the toolbar(the last one at the bottom) and add the below in the "Add Custom CSS" block
.arabic /*or whatever class you wish to use*/ { direction:rtl; text-align:right; font-size:1.1em;/*arabic fonts tend to render smaller*/ }- Now you're all ready to use your little RTL system we created. Create a new post, and just tag it with "arabic" or whatever class you choose. And Voila!
So to wrap it up, we used the
{TagsAsClasses}dynamic tag Tumblr offers to differentiate posts from one another even if they're of the same type. And by using also the custom CSS we can add, we created an instant RTLing process which gave us a somehow bidirectional Tumblr blog.
I also found an Arabic RTLed Tumblr post talking about this second solution; check it out.
Comments
Ron Barak (not verified)
Sat, 05/02/2011 - 20:49
Permalink
A usage example please...
Hi,
Would you mind adding an example to explain "Now you're all ready to use your little RTL system we created. Create a new post, and just tag it with "arabic" or whatever class you choose. And Voila!" ?
Thanks.
nights
Sun, 06/02/2011 - 16:50
Permalink
Example
In your tubmlr dashboard, create a new post and in the "tags" box on the right, add the tag "arabic" and save your post.
Ron Barak (not verified)
Sat, 05/02/2011 - 21:32
Permalink
Is there a way to put RTL text in the title, right justified ?
Is there a way to put RTL text in the title, right justified ?
Thanks,
Ron.
Natalie (not verified)
Sat, 16/07/2011 - 18:41
Permalink
Hi,
Hi,
Thank you for the great tutorial. I linked to this post in my Tumblr.
Do you know how to take care of the date? for some reason, the theme won't show the date when I do this RTL trick...
Thanks,
Natalie
nights
Mon, 18/07/2011 - 09:35
Permalink
Strange!
Thanks for your feedback =)
The date thing is strange! Which theme are you using?
Nicole Kidman's (not verified)
Tue, 09/08/2011 - 04:18
Permalink
hi
Great post. Very informative and useful as well. I just want to ask if is there a way to put RTL text in the title, right justified ?I am looking forward to visit here again..
shmolik katz (not verified)
Fri, 12/08/2011 - 11:51
Permalink
works great!
Thank you.
Shuaib Alise (not verified)
Sun, 11/09/2011 - 22:11
Permalink
Need help :(
Hi,
Was going through the steps but for some reason I cannot find <div class="post">. Would there be a reason for that.
nights
Mon, 12/09/2011 - 09:40
Permalink
If you're familiar with HTML,
If you're familiar with HTML, try looking for the <div> that wraps the post structure. What's the theme you're using? I can help you find it.
Lana (not verified)
Tue, 25/10/2011 - 04:57
Permalink
Desperately need help
Hey, NightS I'm starting a blog on tumblr and i'm so frustrated because i can't post text from right to left, and i'm very unfamiliar with HTML so i tried to follow your steps, but i'm totally lost. I'm trying to post in arabic too. I'd like it bidirectional so i can also post in English. I'm using the "Esquire" theme. this is so confusing. Is it possible that someone can do it for me?
Aphrodite (not verified)
Sat, 07/01/2012 - 02:14
Permalink
there is no CSS in my html
Hi,
When I choose my theme, instead of "customize Html" as you said, I have "edit html". Even when I click on that and see the code, I do not find "css" in the script. Are you using a specific theme?
I would be grateful if you reply since I also want to have some posts in Persian and some in English.
Thanks,
A
nights
Sat, 07/01/2012 - 12:04
Permalink
To Aphrodite
Hello,
tag(in the beginning of the script). Is there a link of the theme you're using so I can check it for you?Tumblr people have changed the interface. It's now "Edit HTML", thanks for pointing this out, I'll update the post.
Now, the tutorial I wrote should apply to all tumblr themes not just a specific one. Which theme are you using? The style is usually in the
Aphrodite (not verified)
Sat, 07/01/2012 - 23:48
Permalink
support for right to left languages
Hi again,
I have a few questions.
1- Do I have to follow procedures under both titles: "RTLing any Tumblr theme" & "Adding RTL support to a Tumblr theme" or just the second one if I want to have a bidirectional blog based on my posts which I tag?
2-In your "3 Different Ways to RTL your CSS", on the third option, you're talking about 2 files. Where are they located? As I understand there is only one file for themes to be customized.
3- I flipped all "left"s to "right"s but I still see the ! and . marks on the other end of the sentence.
4-You mentioned to go in "advanced tab" to "Add Custom CSS" block. There is no such tab. Where in the html file should I add the code for defining the tag class?
5-Can I see the bidirectional blog you're writing?
Thanks,
Aphrodite
nights
Sun, 08/01/2012 - 12:10
Permalink
Answers
Hello again =)
1- No if you have a bidirectional blog use the second one.
2- You don't need flip any of the styles(since you're only adding support). But if you want to totally RTL a tumblr theme, use the first method not the third. Since the styles are all in one place inside the