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

Right-to-left format method #5

Open
joeroe opened this issue Feb 5, 2021 · 0 comments
Open

Right-to-left format method #5

joeroe opened this issue Feb 5, 2021 · 0 comments

Comments

@joeroe
Copy link
Owner

joeroe commented Feb 5, 2021

R seems to have some support for right-to-left scripts, presumably picking up on the unicode bidi class, e.g.:

library("numerals")
numeral(1:9, "ar")
#> <numeral[9]>
#> [1] ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩

But it doesn't always happen when expected:

numeral(1:9, "fa")
#> <numeral[9]>
#> [1] ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹

And it would also be nice if the indices and justification followed, something like this:

library("numerals")
numeral(1:9, "ar")
#> <numeral[9]>
#> ١] ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩]
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

1 participant