Created
January 23, 2019 11:52
-
-
Save Bramengton/d9afa10b994e55ca09adbd43b41ef7c7 to your computer and use it in GitHub Desktop.
RTL -> LTR -> RTL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LTR We will send an SMS with a confirmation code to your phone number: %s | |
| On screen: We will send an SMS with a confirmation code to your phone number: +380123456789 | |
| RTL \u202Cאנו נשלח הודעת SMS עם קוד אישור למספר הטלפון שלך:\u202A %s | |
| You can embed bidi regions using unicode format control codepoints: | |
| Left-to-right embedding (U+202A) | |
| Right-to-left embedding (U+202B) | |
| Pop directional formatting (U+202C) | |
| So in java, to embed a RTL language like Arabic in an LTR language like English, you would do | |
| myEnglishString + "\u202B" + myArabicString + "\u202C" + moreEnglish | |
| and to do the reverse | |
| myArabicString + "\u202A" + myEnglishString + "\u202C" + moreArabic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment