ts-package-starter - v1.3.0
    Preparing search index...

    Function toWadeGiles

    • Convert Chinese text to Wade-Giles romanization.

      Parameters

      • text: string

        Chinese text to convert (can include non-Chinese characters)

      • options: WadeGilesOptions = {}

        Conversion options

      Returns WadeGilesResult

      Conversion result with text and segments

      // Basic usage
      toWadeGiles('台北').text; // "t'ai²-pei³"

      // With options
      toWadeGiles('高雄', { toneFormat: 'number' }).text; // "kao1-hsiung2"

      // URL-safe output
      toWadeGiles('台灣', { urlSafe: true }).text; // "tai-wan"

      // Mixed text
      toWadeGiles('Hello 世界!').text; // "Hello shih⁴-chieh⁴!"