Вопрос

I've done some research and can't find any way to transliterate Japanese.

Stringex would have been the best bet, but it's a known issue that it treats Japanese as Mandarin. I've verified this happens even when there are obvious Japanese characters present (ie kana). Same for Unidecoder.

I realise it's a hard problem as Kanji phonetics are ambiguous, but this is for URL slugs so it doesn't have to be perfect.

Это было полезно?

Решение

I've never tried it, but you could try this:

https://github.com/makimoto/romaji

"Romaji" is basically the name for system the Japanese themselves use to write in Roman/Latin characters. I am not certain if transliterations targetted at romaji for Japanese speakers will be what you need if you are targetting non-Japanese speakers, but it seems like it might be good.

So you could try romaji in your google searching, that's what I did. Since ruby, of course, originated in Japan, I figured there'd be something around for it.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top