Follow

Opinion needed from people familiar with RTL (right-to-left) languages.

I’m adding a “countries name auto-translation” to @canistop (feat. `Intl.displayNames`). The whole UI remains in English, however.

Which of the following layouts makes more sense?

@meduz @canistop The one with the translation underneath the English text is easier to follow. It’s more clear that the two pieces of text are related.

@kyleschroeder @canistop Thanks Kyle! That’s also what came out from feedback I got on twitter.com/meduzen/status/152

Copy-pasting some findings here:

Unfortunately there’s no browser API to provide the direction of a language.

Alternatives:
- a JS package: github.com/shadiabuhilal/rtl-d
- Unicode CDLR data (github.com/unicode-org/cldr-js), which I choose to use through a PHP lib named Punic (github.com/punic/punic).

So I created an endpoint just for the sake of getting the value of HTML `dir` attribute. :n8rd:

Sign in to participate in the conversation
NintendojoFR

Ceci est l'instance du site NintendojoFR. Elle est réservée aux membres de la rédaction et à nos chers lecteurs qui souhaitent avoir un compte.