(define-obsolete-function-alias 'ideo-trans-simplify-chinese-string
'ideo-translate-string-into-simplified-chinese)
+;;;###autoload
+(defun ideo-translate-region-into-traditional (start end)
+ (interactive "r")
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char start)
+ (let (chr ret rret i prompt)
+ (while (and (skip-chars-forward "\x00-\xFF")
+ (not (eobp)))
+ (setq chr (char-after))
+ (if (setq ret (or (get-char-attribute chr '<-simplified@jp-jouyou)
+ (get-char-attribute chr '<-simplified@jp)
+ (get-char-attribute chr '<-jp-simplified)))
+ (progn
+ (if (cdr ret)
+ (progn
+ (setq i 0)
+ (setq prompt
+ (concat
+ (mapconcat (lambda (cell)
+ (setq i (1+ i))
+ (format "%d. %c" i cell))
+ ret " ")
+ " : "))
+ (while (and (setq rret
+ (string-to-int
+ (read-string prompt)))
+ (not (and (< 0 rret)
+ (<= rret (length ret))))))
+ (delete-char)
+ (insert (nth (1- rret) ret)))
+ (delete-char)
+ (insert (car ret))))
+ (or (eobp)
+ (forward-char))))))))
+
;;; @ End.
;;;