Skip to content

AustinShelby/pinyin-to-bopomofo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinyin-to-bopomofo

Translate between pinyin with tone marks (i.e. zhào), pinyin with numbers (i.e. zhao4), and bopomofo/zhuyin (i.e. ㄓㄠˋ).

Installation

Node.js

npx jsr add @austinshelby/pinyin-to-bopomofo

Deno

deno add jsr:@austinshelby/pinyin-to-bopomofo

Guide

Translate between pinyin and bopomofo.

import {
  bopomofoToPinyin,
  pinyinToBopomofo,
} from "@austinshelby/pinyin-to-bopomofo";

const bopomofo = pinyinToBopomofo("zhào"); // ㄓㄠˋ

const pinyin = bopomofoToPinyin("ㄓㄠˋ"); // zhào

Translate between pinyin (tone numbers) and bopomofo.

import {
  bopomofoToPinyin,
  pinyinToBopomofo,
} from "@austinshelby/pinyin-to-bopomofo";

const bopomofo = pinyinToBopomofo("zhao4", "NUMBER"); // ㄓㄠˋ

const pinyin = bopomofoToPinyin("ㄓㄠˋ", "NUMBER"); // zhao4

About

pinyin-to-bopomofo offers a lightweight way to translate between pinyin (commonly used in mainland China) and bopomofo/zhuyin (commonly used in Taiwan).

Used in

  • MandoFlow. Turn your favorite YouTube videos into personalized Mandarin Chinese language lessons.

About

Translate between pinyin with tone marks (i.e. zhào), pinyin with numbers (i.e. zhao4), and bopomofo/zhuyin (i.e. ㄓㄠˋ).

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors