Jump to content
Search Community

Gsap 3 SplitText Right to Left language support?

jlordy1 test
Moderator Tag

Recommended Posts

It seems that Gsap 3 SplitText doesnt work for RTL languages e.g. Arabic. I'm creating a multi-language project but the characters are in the wrong order for RTL languages. The revert() I added on complete drew my attention to it, as it all goes back into the correct order.

Are there any workarounds?

Link to comment
Share on other sites

  • 3 years later...

Arabic text is not working  i tried using split text , when it comes arabic its totally something else,

<p> تُعد القيادة عبر التاريخ من أهم المؤثرات في نشأة ظاهرة التغير السياسي لدى الشعوب؛ فبقدْر ما تكون الشعوب مصدر إلهام لقياداتها التاريخية التي تحقق لها منجزات مشهودة، تَمنح القياداتُ الشعبَ في الوقت نفسه القدرة على اختزال مراحل تطوره </p>

 

this doesnt work

 

try this font

@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@100;200;400;900&display=swap');

body {
    margin: 0;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

 

please do the needful

Link to comment
Share on other sites

Hi @IT-Devlopers and welcome to the GreenSock forums!

 

It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or Stackblitz that demonstrates the issue? 

 

Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer.

 

Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen

 

If you're using something like React/Next/Vue/Nuxt or some other framework, you may find StackBlitz easier to use. We have a series of collections with different templates for you to get started on these different frameworks: React/Next/Vue/Nuxt.

 

Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

Link to comment
Share on other sites

8 hours ago, Rodrigo said:

Hi,

 

This seems to work 🤷‍♂️

 

 

 

Hopefully this helps.

Happy Tweening!

 no brother this is not fixed try copy that same letter, in different div, and check you will see the difference, only who know arabic  can understand the mistake, actually the letters are seperated and it should be aligned to each other like cursive letters,  could you please help me

Link to comment
Share on other sites

15 hours ago, GSAP Helper said:

Hi @IT-Devlopers and welcome to the GreenSock forums!

 

It's pretty tough to troubleshoot without a minimal demo - the issue could be caused by CSS, markup, a third party library, your browser, an external script that's totally unrelated to GSAP, etc. Would you please provide a very simple CodePen or Stackblitz that demonstrates the issue? 

 

Please don't include your whole project. Just some colored <div> elements and the GSAP code is best (avoid frameworks if possible). See if you can recreate the issue with as few dependancies as possible. If not, incrementally add code bit by bit until it breaks. Usually people solve their own issues during this process! If not, then at least we have a reduced test case which greatly increases your chances of getting a relevant answer.

 

Here's a starter CodePen that loads all the plugins. Just click "fork" at the bottom right and make your minimal demo

 

 

If you're using something like React/Next/Vue/Nuxt or some other framework, you may find StackBlitz easier to use. We have a series of collections with different templates for you to get started on these different frameworks: React/Next/Vue/Nuxt.

 

Once we see an isolated demo, we'll do our best to jump in and help with your GSAP-specific questions. 

 

See the Pen NWEZRMB by atul_ecssr (@atul_ecssr) on CodePen

 

 

 

Link to comment
Share on other sites

Hi,

 

Sorry about the issues but this could be related to the fact that SplitText wasn't designed for right-to-left languages as explained here:

I wish we had some sort of solution for you, but this is a limitation in this regard. We're all ears if you or anyone else has ideas in order to improve SplitText so it works in this type of scenarios.

 

Good luck with your project!

Happy Tweening!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...