3 ms·
One interesting approach would be to use a regex to detect if the name is written in Hanzi, Kanji or the Korean or Vietnamese alphabets and write the name in wh
by goscots 3y ago
One interesting approach would be to use a regex to detect if the name is written in Hanzi, Kanji or the Korean or Vietnamese alphabets and write the name in whatever format is appropriate for the locality. The Asian people I know would be be unsurprised to see their name rendered western style when written using whatever romanization format their native language uses.
- naniwaduni 3y agoYou can't do this: what language do you think a name like 金正恩 belongs to, and how do you rule out the others? Given this, what parts do you expect to extract from it?
- midoridensha 3y agoIt's very simple: put a drop-down field on the web form which allows the user to select which naming convention they'd like to use (generally by country, but there can be more for other regions too). This should yield only a few hundred different options to scroll through. Then each option loads a different form specific to that option. Load the whole thing in one giant blob of JS and have it load for every page view. I've seen lots of websites programmed exactly this way, so it's obviously good web design.
- kelnos 3y agoSure, but that was a direct response to someone who said "just have a single field and run it through a regex to figure things outs".
- paulmooreparks 3y agoUpvoted for the delightful use of sarcasm.
- jameshush 3y agoYou mean well so I gave you an upvote :-). I'm a Westerner living in Asia. The name my British parents gave me is James Hush. Every family member calls me Jamie. My legal Chinese name is 許杰, if you tried to write that the "Western" way the closest thing you could do is write xǔ jié, but even then there's multiple Chinese characters that represent "xǔ" and "jié" so it would make no sense. Names are hard hahahaha.
- jack1243star 3y agoPlease don't do this. Like with western names, it is impossible to discern nationality/culture from written names alone.