Download the PHP package lingodotdev/sdk without Composer

On this page you can find all versions of the php package lingodotdev/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

Lingo.dev PHP SDK

Official PHP SDK for Lingo.dev, a powerful localization engine that supports various content types including plain text, objects, and chat sequences.

Installation

You can install the SDK via Composer:

Basic Usage

After installing the package, bootstrap the engine with your API key:

Configuration Options

Option Type Required Default Description
apiKey string Yes Your Lingo.dev API key
engineId string No Your Lingo.dev Engine ID
apiUrl string No https://api.lingo.dev API base URL
batchSize int No 25 Max items per chunk (1–250)
idealBatchItemSize int No 250 Max words per chunk (1–2500)

Scenarios demonstrated in this README

  1. Text Localization
  2. Object Localization
  3. Chat Localization
  4. Batch Localization
  5. Language Detection
  6. Progress Tracking

Requirements

Getting Started

Creating a New PHP Project with Lingo.dev SDK

Follow these steps to create a new PHP project that uses the Lingo.dev SDK:

  1. Create a project directory:

  2. Initialize Composer:

  3. Add Lingo.dev SDK as a dependency:

API Scenarios

Initialize the SDK

Text Localization

Translate a simple text string from one language to another:

Object Localization

Translate an array of strings while preserving the structure:

You can pass a reference to provide additional context:

Chat Localization

Translate a chat conversation while preserving speaker names:

Language Detection

Detect the language of a given text:

Batch Localization

Translate a text to multiple languages at once:

Progress Tracking

Track the progress of a localization operation:

Demo App

If you prefer to start with a minimal example instead of the detailed scenarios above, create index.php in an empty folder, copy the following snippet, install dependencies with composer require lingodotdev/sdk, set LINGODOTDEV_API_KEY (and optionally LINGODOTDEV_ENGINE_ID), and run php index.php.

Want to see everything in action?

  1. Clone this repository or copy the index.php from the demo below into an empty directory.
  2. Run composer install to pull in the SDK.
  3. Populate the LINGODOTDEV_API_KEY environment variable (and optionally LINGODOTDEV_ENGINE_ID).
  4. Execute the script with php index.php and observe the output.

index.php demo:


Release Process

The SDK uses semantic versioning (MAJOR.MINOR.PATCH) and is automatically published to Packagist when changes are merged to the main branch. The release process includes:

  1. Running tests to ensure code quality
  2. Detecting the current version from git tags
  3. Automatically bumping the patch version
  4. Creating a new git tag for the new version

Packagist automatically fetches new versions from the GitHub repository when tags are pushed, making the new version immediately available for installation via Composer. The version is determined by git tags rather than being stored in composer.json, following Packagist best practices.

Documentation

For more detailed documentation, visit the Lingo.dev Documentation.

License

This SDK is released under the MIT License.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lingodotdev/sdk contains the following files

Loading the files please wait ...