I want to support many languages of the world, to be precise: over 150 different languages (tbh I support all languages that google translator supports). For that I use Google's Font Family Noto: https://fonts.google.com/noto
˜800 languages are covered with the font Noto Sans. But other ˜200 languages like Japanese and Korean, require dedicated fonts like Noto Sans Japanese or Noto Sans Korean.
The problem is: e.g: an english user (living in New York, but immigrated from Tokyo) (who uses Noto Sans because he uses my app in english), sees Japanese content because he follows japanese users. If I render now the japanese text with Noto Sans, he will either see weird glyphs like ▯▯▯▯▯▯▯▯▯ or his app will crash.
Of course I don't want that. I have to detect that the text is Japanese, and render the text with its correct font.
Can someone suggest me a javascript library (that detects languages/typefaces) that works on the browser with React, but also with React Native on Android/iOS? Or maybe just another font that looks like Roboto/Noto/Helvetica, but supports many languages?
thanks in advance!
edit second question: What should I do if a japanese guy uses japanese kanji/kata/hira and english in one sentence? how to deal with that?
you need get header request which language is has oky
Accept-Language: Accept-Language: *