Aromanize-js
Korean transliteration utility for JavaScript
Aromanize extends the functionality of JavaScript's String class for romanizing Hangul (한글) to Latin (로마자/Romaja) script.
Usage
HTML
Include aromanize.js
into your HTML page. All is set!
<script type="text/javascript" src="aromanize.js"></script><script type="text/javascript"> // Converts to Latin script "안녕하세요?"; // annyeonghaseyo? // Alternative way to romanize Aromanize; // annyeonghaseyo? // Romanize using RR Transliteration rule Aromanize; // jal meog-eoss-seubnida. </script>
If you don't want to extend String class, include aromanize.js?base
where you can still access all functions through Aromanize
object.
<script type="text/javascript" src="aromanize.js?base"></script><script type="text/javascript"> // Converts to Latin script Aromanize; // annyeonghaseyo? </script>
Node.js
This module can be installed via npm:
$ npm install aromanize --save
var Aromanize = ; // Converts to Latin script"안녕하세요?"; // annyeonghaseyo? // Alternative way to romanizeAromanize; // annyeonghaseyo? // Romanize using RR Transliteration ruleAromanize; // jal meog-eoss-seubnida.
If you don't want to extend String class, use var Aromanize = require("aromanize/base");
where you can still access all functions through Aromanize
object.
var Aromanize = ; // Converts to Latin scriptAromanize; // annyeonghaseyo?
Command Line
CLI is available when installed via npm:
$ npm install aromanize -g$ aromanize Usage: aromanize [TARGET] [OPTIONS] <input> Example: aromanize -r "안녕하세요?" TARGET: -r, --romanize, -l, --latin Converts to Latin script. OPTIONS: --rule=RULE Use specified transliteration rule. --help Display this help message. RULE: rr Revised Romanization Transcription rr-translit Revised Romanization Transliteration skats SKATS Coding ebi Indonesian Transcription
Documentation
A complete documentation is available at GitHub Wiki
License
Aromanize-js is released under the MIT License.
© 2017 Fajar Chandra
Changelog
0.1.5
- Added an option for hyphenating syllables.
- Added SKATS transliteration and Indonesian transcription rules.
- Updated demo page.
0.1.4
- Added Revised Romanization transliteration rule (rr-translit) for academic application in addition to Revised Romanization transcription rule (rr).
- Added an option to prevent extending String class.
0.1
- First pre-release