Changing to right to left wordpress theme css

I have a wordpress theme containing style.css & rtl.css, beside other theme files.
I want to change the theme to Right to Left for Arabic. What should I do? Use @import in style.css? Or replacing the text in style.css?

Related posts

Leave a Reply

4 comments

  1. In your header.php file you’ll have a line similar to:

    <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
    

    Replace it with:

    <link href="<?php bloginfo('template_url'); ?>/rtl.css" rel="stylesheet" type="text/css" />
    

    You’re replacing the default stylesheet with the right-to-left one.

  2. To active the Right to Left (RTL) in wordpress you should define the language to Arabic first by edit the line in wp-config.php
    just add ar between the ” to be ‘ar’

    define( 'WPLANG', 'ar' );
    

    then, go to http://ar.wordpress.org and download the package, extract/unzip and upload the folder
    /wp-content/languages to your wordpress /wp-content
    refresh your blog and it should changed automatically to arabic

    PS: changing the WPLANG will effect admin menus and everything in the
    template will changes to the language matches ar.po (in /languages folder if it translated by the theme or plugin.

    please note that the language file must match the WPLANG name, in this case WPLANG set to ar so the .po file must be ar.po.

  3. Navigate to Settings => General in your WordPress dashboard and select the preferred “Site language” – don’t forget to hit the “Save Changes” button. WordPress detects whether your chosen language is a RTL language and when your WordPress theme supports RTL, the rtl.css stylesheet is loaded automatically and your website will be displayed in RTL. That’s it.

    for more information visit this page: How to enable RTL for your WordPress website?