Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweets can be written in different languages. Language metadata is essential for browsers to correctly render multilingual texts because the different language uses different shapes of glyphs for the same Unicode codepoints, and the browsers must select fonts based on the intended language[^1]. Twitter API infers the primary language of each tweet, and this patch sets the `lang` attribute to the inferred language for the tweet bodies. `dir="auto"` is also necessary for proper rendering of texts in the right-to-left languages, such as Arabic, Hebrew, and Persian. [^1]: Regarding font selection in CJK languages: <https://heistak.github.io/your-code-displays-japanese-wrong/>.
- Loading branch information