-
protected, static _nTrans(methodName, langTbl, transTbl)
-
Add new transliteration method using two parallele tables
Parameters:
Name |
Type |
Description |
methodName |
String
|
the name of the method |
langTbl |
Array.<String>
|
array of strigs, the languages characters |
transTbl |
Array.<String>
|
array of strigs, their respective representations |
-
protected, static _sTrans(methodName, trans, untrans)
-
Set transliteration methods directly
Parameters:
Name |
Type |
Description |
methodName |
String
|
the name of the method |
trans |
function
|
function of transliteration |
untrans |
function
|
function of untransliteration |
-
protected, static _sTransCnd(methodName, preFunc, postFunc)
-
add pre- and post-transliteration functions to a method
Parameters:
Name |
Type |
Description |
methodName |
String
|
the name of the method |
preFunc |
function
|
function that executes before transliteration;
It takes a string and returns a string |
postFunc |
function
|
function that executes after transliteration;
It takes a string and returns a string |
-
protected, static _sUntransCnd(methodName, preFunc, postFunc)
-
add pre- and post-untransliteration functions to a method
Parameters:
Name |
Type |
Description |
methodName |
String
|
the name of the method |
preFunc |
function
|
function that executes before untransliteration;
It takes a string and returns a string |
postFunc |
function
|
function that executes after untransliteration;
It takes a string and returns a string |
-
static listTransliterations() → {Array.<String>}
-
Returns the list of available transliteration methods
Returns:
Array.<String>
- methods names
-
-
Sets the current method to be used for [un]transliteration
Parameters:
Name |
Type |
Description |
methodName |
String
|
method's name |
-
-
transliterate the text using the current method
Parameters:
Name |
Type |
Description |
text |
String
|
the untransliterated text (original) |
Returns:
String
- the transliterated text
-
static transliterate(text) → {String}
-
transliterate the text using the current method
Parameters:
Name |
Type |
Description |
text |
String
|
the untransliterated text (original) |
Returns:
String
- the transliterated text
-
-
untransliterate the text using the current method
Parameters:
Name |
Type |
Description |
text |
String
|
translaterated text |
Returns:
String
- untranslaterated text (original text)