Add RTL mode

I would like to add an option in the text window for writing in a language that flows from right to left.
The text alignment should be from right to left, rather than from left to right as in English.

Welcome to the Community, @Ben_Mizrahi1 :waving_hand:

Thanks a heap for taking time to share your thoughts! Could you please specify the widget where you’d like to implement the RTL feature?

Hi Max,
Thanks for the response.
The widget I’m using is Portfolio “Illustration,”
inside the text box.

Thanks!

I’ve just checked your widget and see that you’re using Hebrew there. Just to confirm, do you need to apply the RTL mode to the project description or to all elements, except for the English widget title?


If the RTL mode is applied to the Author section, should the photo be left-aligned and the CTA button right-aligned?

Thanks, Max.

I am using the site in Hebrew—my native language—but the application/system does not fully support Hebrew. As a result, all text is currently aligned to the left.

When Hebrew is selected as the language for the application, this should be the default setting.

In every area containing a text box, as well as within the document view itself, typing should begin from the right. Since our language is read from right to left, all text—including in the header area—should be aligned to the right.

It would be helpful to include an option within the text box—similar to the example I’ve attached—that allows the user to choose the alignment: right, center, or left.

Got it, thanks!

We’ll try to consider it as a native option in the widget’s settings in the future, especially if more users upvote it.

I also see that my colleague Anastasia has shared a CSS code to apply the RTL mode to your widget:

.eapp-portfolio-author-name,
.eapp-portfolio-author-description,
.eapp-portfolio-project-look-bottom-overlay-name,
.eapp-portfolio-project-look-bottom-overlay-description,
.eapp-portfolio-project-look-bottom-overlay-meta,
.eapp-portfolio-project-look-overlay-name,
.eapp-portfolio-project-look-overlay-description,
.eapp-portfolio-project-look-overlay-meta {
  direction: rtl !important;
  unicode-bidi: plaintext !important;
  text-align: right !important;
}

Give it a try and let us know how it worked :wink:

Thanks, Max.

It works perfectly for me.
Everything was resolved with a single command, and it looks great.
I really appreciate the effort, the support, and the quick response.
I’ve attached a screenshot from my mobile phone.

One more question, please:
Is there a command that would allow me to swap the positions of the text and the profile picture?
Take a look at the screenshot I sent you.
This screenshot shows the view on a computer—before and after applying the commands you provided to align the text to the right.
However, the text actually needs to be aligned to the right side of the screen, with the profile picture on the left.

Thank you Ben.

Yes, please try to use this code instead :wink:

.eapp-portfolio-author-component:not(.eapp-portfolio-author-b480) {
  flex-direction: row-reverse;
  align-items: flex-start;
  position: relative;
  direction: ltr;
}

.eapp-portfolio-author-component:not(.eapp-portfolio-author-b480) .eapp-portfolio-author-picture {
  margin-left: 0 !important;
  margin-right: auto;
}

.eapp-portfolio-author-component:not(.eapp-portfolio-author-b480) .eapp-portfolio-author-info {
  padding-left: 32px;
  padding-right: 0 !important;
}

/* Move contacts and CTA under the photo (offsets assume 128px photo) */
.eapp-portfolio-author-component:not(.eapp-portfolio-author-b480) .eapp-portfolio-author-contacts {
  position: absolute;
  left: 0;
  top: 148px;
  direction: ltr;
  text-align: left;
  justify-content: flex-start;
}

.eapp-portfolio-author-component:not(.eapp-portfolio-author-b480) .eapp-portfolio-author-cta {
  position: absolute;
  left: 0;
  top: 190px;
  direction: ltr;
}