The Translation Connector SDK for Oracle Content Management is a sample NodeJS implementation of the Translation Connector API. The sample accepts an Oracle Content Management translation job zip file, translates all the resources in the file, and returns a new zip file containing all the translations.
Note: The SDK requires the user to have access to a Language Service Provider to do the actual string translations. A mock Language Service Provider server is included in the SDK to mimic the responses from the Language Service Provider by simply prepending the targeted locales onto the strings.
The Translation Connector SDK consists of three main modules:
- SampleConnector: A sample translation connector that implements the required Oracle Content Management Translation Connector API.
- SampleJobManager: A filesystem based sample job manager that maintains the state of the connector jobs while they are translated.
- TranslationProviderInterface: A set of APIs used to call the Language Service Provider to submit documents for translation and retrieve the translated documents.
The Sample Translation Connector code is split up into three areas:
- /connector: Implements the required Oracle Content Management Translation Connector APIs.
- /job-manager: A sample implementation of a file-based persistence store to unzip the translation job, translate it and zip up the translations.
- /provider: Implements the Language Service Provider APIs to upload, translate and download documents.
In addition, there is an implementation of a mock Language Service Provider for testing:
- /mockserver: A mock Language Service Provider, which simply adds the requested translation locale to all the strings.