Guy Rutenberg

Keeping track of what I do

RTL Tiddlers in TiddlyWiki

with 3 comments

I’ve been using TiddlyWiki for a while now, and it became a very useful tool for me. Today, I’ve decided to organize my various recipes (somehow cooking and especially making deserts has turned into an hobby of mine), and as you can expect I’ve decided to use TiddlyWiki for the tasks.

There was a slight problem as some of the recipes are in Hebrew, and it seems TiddlyWiki doesn’t have built-in support for RTL (right-to-left) tiddlers. However, such support can be added via custom stylesheets and the tiddlers’ tags. The idea for this method is taken from this TiddlyWiki.

Create a new tiddler called “StyleSheet” (without the quotes). This is a special tiddler (a shadow tiddler) that lets you add additional CSS code for your wiki. Insert the following code into the newly created tiddler:

/*{{{*/
div[tags~="RTL"].tiddler {
    direction: rtl;
}
div[tags~="RTL"].tiddler .subtitle {
    direction: ltr;
}
div[tags~="RTL"].tiddler .tagged {
    direction: ltr;
    float: left;
}
/*}}}*/

Now for every tiddler you want to be in RTL direction just add RTL to its list of tags. After you do it, the tiddler will appear correctly. Here is an example of what in RTL looks like after the fix:

A screenshot of an RTL tiddler

A screenshot of an RTL tiddler

Share and Enjoy:
  • del.icio.us
  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google Bookmarks
  • Simpy

Written by Guy

March 28th, 2009 at 5:20 pm

Posted in Tips

Tagged with ,

3 Responses to 'RTL Tiddlers in TiddlyWiki'

Subscribe to comments with RSS or TrackBack to 'RTL Tiddlers in TiddlyWiki'.

  1. Yeah but…
    CSS3 is not supported by MSIE :(
    So your code will not work with MSIE :/

    If you show me the page perhaps i can help you…

    regards

    confiq

    10 Apr 09 at 22:42

  2. Someone named Yitzhak wrote to me and pointed out that for Hebrew tiddlers one could add the following

    div[tags~="RTL"].tiddler ol {
        list-style: hebrew;
    }

    in order to get Hebrew numbering. I personally prefer normal numbering but I thought other might find it useful.

    @config: I know that this solution doesn’t work in IE (at least for now), but I look at it as a no-problem, as I don’t use IE :) You need to use a decent browser in order to enjoy elegant solutions.

    Guy

    16 Apr 09 at 14:10

  3. Thanks Guy! I have just decided to try up tiddlywiki again – and an easy way to RTL tiddlers of my choice is a huge PRO.

    Daphna Shezaf

    19 Apr 09 at 08:02

Leave a Reply