Open Chinese Convert 0.4.3 A project for conversion between Traditional and Simplified Chinese

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

All Data Structures Files Functions Variables Groups Pages
Data Structures | Functions | Variables
Node.js API

Node.js language binding. More...

## Data Structures
class | OpenCC
| OpenCC Node.js API. More...

## Functions
void | OpenCC::convert (string input, function callback)
| Converts input text. More...
string | OpenCC::convertSync (string input)
| Converts input text. More...
void | OpenCC::setConversionMode (int conversionMode)
| Sets conversion mode. More...

## Variables
OpenCC | CONVERSION_FAST = 0
| Default conversion mode.
OpenCC | CONVERSION_SEGMENT_ONLY = 1
| Only converts text into segments.
OpenCC | CONVERSION_LIST_CANDIDATES = 2
| List all candidates of every segment.

## Detailed Description

Node.js language binding.

## Function Documentation

void convert | ( | string | input,
|  | function | callback
| ) |  |

Converts input text.

Parameters

  input | Input text.
  callback | Callback function(err, convertedText).

string convertSync | ( | string | input | ) |

Converts input text.

Parameters

  input | Input text.

Returns
  Converted text.

void setConversionMode | ( | int | conversionMode | ) |

Sets conversion mode.

Parameters

  conversionMode | Conversion mode.