Translate given text into Baybayin, Buhid, Hanunoo, or Tagbanwa scripts.
Demo deployed in Vercel
npm install filipino-script-translatorImport the translate() and the enum from the package.
Change the script parameter into one of the enums, the default is BAYBAYIN:
import { Script, translate } from 'filipino-script-translator';
const result = translate('maganda', Script.BAYBAYIN);
// Output: ααααα
const result = translate('maganda', Script.TAGBANWA);
// Output: α«α€α§
const result = translate('maganda', Script.HANUNOO);
// Output: α«α€α¨α΄α§
const result = translate('maganda', Script.BUHID);
// Output: ααnαor directly use the translator methods base on the script you want:
import { toBaybayin, toBuhid, toHanunoo, toTagbanwa } from 'filipino-script-translator';
const result = toBaybayin('maganda');
// Output: ααααα
const result = toTagbanwa('maganda');
// Output: α«α€α§
const result = toHanunoo('maganda');
// Output: α«α€α¨α΄α§
const result = toBuhid('maganda');
// Output: ααnαnpm run test
npm run lint
npm run build
This package is open-sourced software licensed under the MIT license.