ausi/slug-generator

Japan letter but translate to Chinese (i think)

plenyun opened this issue · 2 comments

Hi

I try to use the class like this

echo $generator->generate('お風呂 リフォーム | 和歌山県のリフォーム・リノベーション', ['locale' => 'jp']);

the translation in Japan for that word supposed to be something like "O furo rifōmu | Wakayama ken no rifōmu rinobēshon" but the result I got is "o-feng-lu-rifomu-he-ge-shan-xiannorifomu-rinobeshon" i think its Chinese word, did i do some mistake?

ausi commented

I don’t speak Japanese or Chinese, so it’s hard for me to find out what goes wrong.

The following transform rules (provided by the CLDR) transform your text into latin characters:

  1. From Hiragana to Latin:
    o風呂 リフォ̄ム | 和歌山県noリフォ̄ム・リノbēション
  2. From Han to Latin:
    お fēng lǚ リフォーム | hé gē shān xiàn のリフォーム・リノベーション
  3. From Katakana to Latin:
    お風呂 rifōmu | 和歌山県のrifōmu・rinobēshon
  4. From Katakana to Latin (BGN variant):
    o風呂 rifuォーmu | 和歌山県norifuォーmu・rinohe゙ーshon

Can you spot any errors in these transforms, or do you think they are the wrong transformations to use here?

You can find a list of all available transforms in the CLDR: http://unicode.org/repos/cldr/trunk/common/transforms/

Or use the ICU Transform Tool to tryout the different transformations: http://demo.icu-project.org/icu-bin/translit

actually i am not speak japanese / chinese too, just i thought it suppose generate something like this o-furo-rifomu-wakayama-ken-no-rifomu-rinobeshon, but based on ur explanation, i think you right, my bad sorry Ausi :)