Skip to content

LTR to RTL Converter - Allows you to take a frontend template designed for left-to-right usage and transform it into right-to-left design.

Notifications You must be signed in to change notification settings

matancohen365/R2L

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R2L

LTR to RTL Converter

Allows you to take a frontend template designed for left-to-right usage and transform it into right-to-left design.

Installation

With Composer

$ composer require matancohen365/r2l

Usage

*.css files

<?php

use R2L\CSSProcessor;

require __DIR__ . '/vendor/autoload.php';  
  
$processor = new CSSProcessor();  
  
$contents = file_get_contents('path/to/theme.css');  
  
$RTLContents = $processor->process($contents);  
  
file_put_contents('path/to/theme.rtl.css', $RTLContents);

*.liquid.sass files (Shopify templates)

<?php

use R2L\LiquidProcessor;
use R2L\SassProcessor;

require __DIR__ . '/vendor/autoload.php';  
  
$processor = new LiquidProcessor(new SassProcessor());
  
$contents = file_get_contents('path/to/theme.liquid.sass');  
  
$RTLContents = $processor->process($contents);  
  
file_put_contents('path/to/theme.rtl.liquid.sass', $RTLContents); 

Demo

R2L - LTR to RTL Converter

Questions

🆓 License

The R2L package is open-sourced software licensed under the MIT license.

About

LTR to RTL Converter - Allows you to take a frontend template designed for left-to-right usage and transform it into right-to-left design.

Topics

Resources

Stars

Watchers

Forks

Languages