spree_rtl

Spree extension for rtl layout

Last updated on: June 05 at 09:46 AM

source code bug tracker
Opensource
0 0 0
owner:  mshirdel

Spree_rtl

This is a work in progress. Please do not use!

This is a Spree extension to provide Right to left layout for rtl languages such as Arabic, Persian, Urdu, and others.

Installation

Add spree_rtl to your Gemfile:

gem 'spree_rtl'

Bundle your dependencies and run the installation generator:

bundle
bundle exec rails g spree_rtl:install

How to use

add the folowing to every locale you want to be directed left to right: Assuming locale is Arabic, open the /config/locales/ar.yml or created if it does not exist and add dir: "rtl" Please note that if you just created an empty file, you need to add ar: at the very top of the file.

Testing

First bundle your dependencies, then run rake. rake will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app.

bundle
bundle exec rake

When testing your applications integration with this extension you may use it's factories. Simply add this require statement to your spec_helper:

require 'spree_rtl/factories'

Checklist (more will be added to it)

  • [x] Change layout from ltr to rtl depeding on language
  • [x] Give the user the ablity to enable and disable changing layout direction
  • [ ] Apply layout changes to admin panel.
  • [ ] Default dir to ltr when not being defined in locale.
  • [ ] move the homepage link at the top to the right.
  • [ ] Reorder the checkout stages bar at the top of /checkout.

Copyright (c) 2014 Aman Alshurafa, released under the New BSD License

compatible spree versions
tags spree versions
master ~> 3.2.0
authors
Meysam Shirdel