Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTL (right-to-left language) support #17279

Closed
ghost opened this issue Aug 24, 2015 · 24 comments
Closed

RTL (right-to-left language) support #17279

ghost opened this issue Aug 24, 2015 · 24 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2015

hi!
i customize bootstrap3 and make it's direction dynamically by adding a $dir var in variables file then on each files check if $dir == 'rtl' then float:right else float left. why you don't add this feature to bootstrap 4?! it's make bootstrap more amazing ;-)

@kkirsche
Copy link
Contributor

@M-Ekramy am I correct in understanding that you would like better support of RTL text formats? Just want to make sure I fully understand your goals

@ghost
Copy link
Author

ghost commented Aug 24, 2015

yes if it can be changed dynamically by changing a dir variable in the main variable file. it's mine code that wrote for bootstrap 3:

_variables.scss

$Direction: 'rtl';
and for example in my file if i have float:left; changed it to:
@if ($Direction == 'rtl'){ float: right; }@else{ float: left; }

@cvrebert cvrebert changed the title Dynamic layout direction RTL (right-to-left language) support Aug 24, 2015
@cvrebert
Copy link
Collaborator

I agree with mdo's remark (#17280 (comment)) that the approach being suggested is overly simplistic and incomplete. See also https://github.com/twitter/css-flip#supported-css-properties-a-z
X-Ref: #15509
I believe the current plan is to try adding RTL support as a new feature in a minor release post-v4.0.0, although given the Core Team's lack of RTL expertise, it's still a bit up in the air.

@gam-phon
Copy link

gam-phon commented Sep 1, 2015

It is very strange that bootstrap did not support RTL until now. I was waiting this feature from version 2. In some project, I have to switch to foundation because they support RTL out of the box. Bootstrap is a very great project and I hope they will support RTL very soon. Thanks for making Bootstrap even greater than before.

@mdo
Copy link
Member

mdo commented Sep 1, 2015

@gam-phon There are addons for handling that in v3. We didn't have too much time to put into it ourselves, so we never got around to making it official.

@oriSomething
Copy link

i remind #16419 because with better naming it would be easier path toward r-t-l support

@cvrebert cvrebert mentioned this issue Sep 14, 2015
@asaf
Copy link

asaf commented Sep 28, 2015

(Until it's official, at least this issue can be a reference for others)

Grid columns should be flipped in RTL, what would be the most appropriate way to do the flipping ?

@oriSomething
Copy link

@asaf
i found that is still the best in the end to have two separate CSS files, one to RTL and another to LTR. but, of corse it should contains both styles of .*-start / .*-end classes with .*-left / .*-right. because in end they both needed for multi-lang support.
by the way, the reason for two separate files is specificity hell if your using top elements styles

@asaf
Copy link

asaf commented Oct 4, 2015

@oriSomething Thanks,
I don't see how it solves columns flipping, what I'm saying is, if you have a grid with 2 columns a:left/b:right, : in RTL, it should look like: b:right/a:left,

@weitzhandler
Copy link

Very demanding!

BTW, this repo (by @morteza) does that, but it's not convenient to deal with two libraries, and it will obviously be great if it's integrated in the main repo, I'm sure the OP of that lib would also vote for this.

@M-Ekramy Can I achieve #17279 (comment) with LESS?

@oriSomething
Copy link

@asaf what wasn't understood?

you have the absolute direction rules a:left/b:right and the page local direction a:start/b:end that will flipped when you user the (let's say) bootstrap-rtl.css

@mdo
Copy link
Member

mdo commented Oct 8, 2015

I'm sure the OP of that lib would also vote for this.

That person was staunchly against it actually 😆.

@weitzhandler
Copy link

That person was staunchly against it actually 😆.

@mdo well I don't know why you'd say so, but he's definitely changed his mind now, as he states loud and clear right at the beginning of his repo readme:

@taitems
Copy link

taitems commented Nov 30, 2015

Hey all, does the lack of a milestone set against this issue mean "it will happen when it happens" or is this going to drop as part of 4.0? I'm just not overly familiar with feature planning in Bootstrap.

@evilaliv3
Copy link

we have this requirement also in the [GlobaLeaks[(https://github.com/globaleaks/GlobaLeaks) project;

Since a little we are using the bootrap-rtl fork made by @bright wich approach is simplified and effective: https://github.com/bright/bootstrap-rtl/blob/master/README.md

@mdo
Copy link
Member

mdo commented Feb 7, 2016

Punting for v4.0.

@mdo mdo closed this as completed Feb 7, 2016
@evilaliv3
Copy link

@mdo which is the open ticket that keeps track of this topic?

@cvrebert
Copy link
Collaborator

cvrebert commented Feb 8, 2016

@evilaliv3 There isn't one, but don't worry, given the number of times folks have asked for RTL, we won't soon forget about it. But we're not going to delay v4.0.0 for this. RTL will probably land in a later minor release (e.g. v4.2.0).

@Mohsen7s
Copy link

Mohsen7s commented May 3, 2016

Is this finally supported in newest release (v4.0.0-alpha.2)?

@cvrebert
Copy link
Collaborator

cvrebert commented May 3, 2016

@Mohsen7s No. Please refer to my previous comment.

@ghost
Copy link
Author

ghost commented May 15, 2016

Inserting RTL support for Bootstrap will be a best historical move and will solve so much headaches for so many users. Let me demonstrate that live: The Drupal community, which I am a proud member of, for about 5 years now, has always suffered from lack of RTL support; There are many hopes within that community that releasing RTL support for Bootstrap will help quite that problem as a huge number of Drupal themes are Bootstrap based and almost any premium theme I ever saw for Drupal is Bootstrap based. This will be a major leap forward, I am so waiting for this !

@sitefinitydcx
Copy link

@cvrebert If/when you guys go for RTL, please do a proper implementation that supports bi-directional content on an individual page. Worked in Dubai for 3yrs and can't count the number of times when when AR and EN content needed to be mixed.

I've created a port myself that supports twbs 3.3.6, sass and ltr/rtl/bidi by means of mix-ins and avoiding to think in terms of left and right but pushing against the box-model and pulling at the box-model but there are cleaner and better ways to make just twbs bi-directional if we're just talking about twbs scope.

In any case, more than happy to chat, assist, help when you guys are in the mood and considering this.

@al1b
Copy link

al1b commented May 28, 2016

Will Bootstrap 4 support RTL? OR when will it be?

I'm developing a web application that uses Bootstrap 3.x. I would like to use Bootstrap 4 but there is not any RTL version of it.

P.S: Right now Zurb Foundation supports RTL officially.

@cvrebert
Copy link
Collaborator

@al1b See #19555.

@twbs twbs locked and limited conversation to collaborators Jun 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests