Skip to:
Content
Pages
Categories
Search
Top
Bottom

RTL – Loading alternate CSS for plugins

  • Avatar of Yoav Farhi
    Yoav Farhi
    Participant

    @yoavf

    Hi,

    I’m working on the Hebrew translation. Almost done.

    The problem is I need to load additional CSS for some plugins

    For example in bp-core, I also need to load admin-bar-rtl.css

    Can I expect something like this to be added to each of the plugins that is loading a custom css:

    if (get_bloginfo('text_direction') == 'rtl')

    echo '<link rel="stylesheet" type="text/css" href="'admin-bar-rtl.css" />'."nr";

    The other solution is to add it manually, thus making any RTL translation much more troublesome to maintain and distribute…

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    I’ll add this, thanks for the info.

    Avatar of Yoav Farhi
    Yoav Farhi
    Participant

    @yoavf

    Great.

    Another small change that may be useful in the future:

    In the Home theme, the ID’s for the columns are “right-column, center-column,left-column”,

    Since the design may change (not only in RTL themes), you might want to rename theses to “column1, column2, column3″. More semantic.

    Edit: created ticket #182.

    Please note that WP and WPMU have a built in mechanism for rtl css files using the wp_admin_css() function in wp-includes/general-template.php. When using rtl text direction WP will add the file-rtl.css file so changes may be introduced.

    I recommend using it.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.