3 ms·
How do you do it correctly in a bi-lingual app? Say your app is in English but you want to display asian language file names. Is there any way to tell if a stri
by captainmuon 5y ago
How do you do it correctly in a bi-lingual app? Say your app is in English but you want to display asian language file names. Is there any way to tell if a string is chinese or japanese? I think CJK variation selectors embedded in the string are not widely used. And it would be a bit overkill to include a language detection heuristic (which would likely fail for short phrases). So should you let the user decide? Default to Japanese on a Japanese PC, otherwise leave it undefined?
- skhr0680 5y agoSet it by the device language, with a way to override that in your app’s settings
- lifthrasiir 5y agoThis is a good approximation, but it is still incorrect if, say, you are showing Japanese user names from a view for Chinese users.