The `smartling-api-sdk-nodejs` package provides a Node.js SDK for programmatically interacting with the Smartling Translation API, automating content internationalization and localization workflows. It enables developers to upload source files, manage translation jobs, and download translated content in various languages. This SDK (currently at version 2.31.0) is actively maintained and typically follows a continuous release cadence with new features and bug fixes. It serves as a client library to simplify accessing Smartling's underlying REST APIs, covering functionalities like authentication, accounts, projects, files, and jobs. Key differentiators include streamlining content synchronization with Smartling's Translation Management System (TMS) and offering specialized APIs for common use cases like Jobs and Files, though it provides less comprehensive API coverage than the Java SDK.
npm install smartling-api-sdk-nodejsVerified import paths — ran on the pinned version, not inferred.
This example initializes the Smartling API client using environment variables for authentication and then lists all accessible projects.
Upgrade Node.js to version 18 or newer, or downgrade `smartling-api-sdk-nodejs` to a 1.x.x release (e.g., `npm install smartling-api-sdk-nodejs@^1`).
Never hardcode API credentials directly in source code. Use environment variables (e.g., `process.env.SMARTLING_USER_IDENTIFIER`) or a secure secret management system.
When building API clients, use `apiBuilder.build(Smartling[Service]Api)` with the specific service class (e.g., `SmartlingFilesApi`) corresponding to your API call.
Ensure you have a valid Smartling Project ID and pass it to the relevant API client builder or method parameters as required by the specific API endpoint.
Convert your project or the relevant files to use ES Module `import` syntax (e.g., `import { Name } from 'pkg';`). Ensure your `package.json` specifies `"type": "module"` or use `.mjs` file extensions. If unable to upgrade, use a 1.x.x version of the SDK.Verify that `SMARTLING_USER_IDENTIFIER` and `SMARTLING_USER_SECRET` environment variables are correctly set and contain valid credentials. Regenerate tokens if necessary from the Smartling dashboard.
Ensure you are passing the correct `projectId` to the `SmartlingApiClientBuilder`'s `setProjectId()` method if it's a global client setting, or as a parameter to the specific API method call.
No dependency data recorded yet.