WordPress.org

Ready to get started?Download WordPress

Forums

Tiny Forge
[resolved] RTL option ? (2 posts)

  1. alaahp1801
    Member
    Posted 3 months ago #

    could you please tell me where the RTL option that was include in the tag search .?

  2. Tomas Mackevicius
    Member
    Theme Author

    Posted 3 months ago #

    Hi, in order to activate RTL option, you have to activate the language file that is RTL.

    At this time Tiny Forge doesn't have native language file for all languages, bus you can successfully use Twenty Twelve language files. Get your language file:

    http://translate.wordpress.org/projects/wp/dev/twentytwelve

    and put it in the folder "languages".

    Then activate your language:

    http://codex.wordpress.org/Installing_WordPress_in_Your_Language

    [ Signature moderated. ]

    Some background info:

    Displaying the Site in RTL and LTR

    Now that your content is translated, it’s time to move our attention to the theme.

    This little line does most of the magic:

    <html dir="rtl" lang="he-IL">

    You can see if it you view the source of any Hebrew page. For example, the home page.

    The dir=”rtl” attribute tells the site that the display direction for the entire site is Right to Left. Browsers understand it and will flip everything to right direction.

    This single PHP line, from header.php, makes it happen:

    <html <?php language_attributes(); ?>>

    The call to language_attributes inserts the dir and lang attributes. The values come from the core .mo file. If you have the correct .mo files for WordPress, you get the correct values for these attributes.

    If your theme’s HTML and CSS follow ‘safe’ practices, this is really all you need. By safe, I mean no absolute positioning or widths. If you must use absolutes, you may consider loading different CSS per language.

    Source: http://wpml.org/2011/06/creating-right-to-left-rtl-wordpress-sites/

Reply

You must log in to post.

About this Theme

About this Topic