Multilingual sites: left to right and right to left

I see some good suggestions in SO for building multilingual sites in JavaScript , including this article on Interpreting JavaScript . However, it is difficult for me to identify the best methods for developing multilingual websites where one of the languages ​​is read left to right and the other is read right to left. Do you know any recommendations for this task?

The user can change the language in the middle of the stream - possibly from English to Arabic.

+3
source share
2 answers

It would be good practice to use the lang attribute to describe which language is used: http://www.w3.org/TR/REC-html40/struct/dirlang.html

I would define the language inside the chapter and, if necessary, locally inside the document.

You do not specify what type of doctype you use, but if you use XHTML, then there are also xml lang attributes: http://www.w3schools.com/Xhtml/xhtml_syntax.asp

I don't know if this is “best practice,” but when I recently worked on an English and Arabic site, it was useful for me to use CSS classes to install rtl and ltr.

+2
source

RTL.
, lang ( ), :

0

Source: https://habr.com/ru/post/1730667/


All Articles