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 Language Support #294

Open
slowbot opened this issue May 5, 2020 · 1 comment
Open

RTL Language Support #294

slowbot opened this issue May 5, 2020 · 1 comment

Comments

@slowbot
Copy link
Contributor

slowbot commented May 5, 2020

We'll need to investigate and implement right to left language support in Pattern Lab in order to test individual components.

Initial tests showed that applying the dir="rtl" class to the html element of Pattern Lab did not have an effect but applying it to the body element did effect the components.

@zakiya

  1. How does Drupal implement right to left natively?
  2. Is there a way we can simulate this in Pattern Lab?
  3. Do you have examples of previous implementations we can look at?
@zakiya
Copy link
Contributor

zakiya commented May 6, 2020

  1. All Drupal sites have a dir attribute in the html tag. (See selfhelf.courts.ca.gov.) When the language is set to a rtl language, it's [dir="rtl"]. All it does by default is change the text direction. (See w3schools)

  2. In places where margins, positioning etc need to be changed, I would just add the appropriate css inline [dir="rtl"] .my class { }. For demo purposes you could add another select to the theme switcher to switch between rtl and ltr.

  3. Here's an example of a multilingual Drupal 8 site: http://iraplegalinfo.org/en/language/selection

@zakiya zakiya removed their assignment Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants