Mixed language in the same document - proper font support.

The following row has three blocks containing plain 'ol english, ethiopian and nepalese language. I put some fancy posters from google about some famous TV shows. Fonts used : Open Sans, Source Sans Pro, Noto Sans Ethiopic, Noto Sans Devanagari.

#time

#time is a famous ethiopian show.

#time (ሃሽ ታግ ታይም) የቃና ቴሌቪዥን ወጥ የሆነ የመዝናኛ ዝግጅት ሲሆን በየሳምንቱ ሙዚቃ፣ የመዝናኛ ዜናዎች፣ አዳዲስ ነገሮች፣ የዝነኞች ዜናዎችን፣ ወቅታዊ ፋሽኖች፤ ፊልሞችንና ጨዋታዎችን ያቀርባል፡፡

breaking bad

We all know about Breaking Bad, right?

Breaking bad is about a desparate old man trying to earn as much money as he can in the time he has left by turning an old RV into a meth lab on wheels.

Singha Durbar

Singha Durbar is Nepal's first Futuristic Political Drama.

टेलिभिजन नाटक पारदर्शिता, उत्तरदायित्व र सहयोगी नेतृत्वको एक प्रशासन प्रणाली स्थापना गर्न उनको खोज मा विभिन्न चुनौतीहरू सामना गर्ने नेपालको पहिलो महिला प्रधानमन्त्री को कथा आसपास घूमती.

Shall we try some RTL support?

a random welsh corgi

A Random Welsh Corgi

كل أدواتهم ومعداتهم لا تزال تعمل بشكل ما أو بآخر.كل أدواتهم ومعداتهم لا تزال تعمل بشكل ما أو بآخر.

RTL support in a LTR document is quite tricky. But it can be done using javascript to detect the RTL language (ex:arabic) and setting direction with it. I haven't tested it, but it seems like there will be performance drag, as it requires looping through every node (really, there's no gurantee that only p tag will contain RTL content).

Mixing arabic and english will open up a whole lot of other headaches like surrounding text's direction and direction neutral characters. This article describes the problem (and offers a bit of a solution too). And here's a stackoverflow answer describing unicode-bidi. MDN mentions unicode-bidi is for DTD authors, so I'll refrain from using it for now.