Skip to content

Releases: Langbly/langbly-php

v1.0.0

19 Feb 13:04

Choose a tag to compare

Langbly PHP SDK v1.0.0

Official PHP SDK for the Langbly Translation API.

Features

  • translate() - Translate text to any of 240+ languages
  • detect() - Detect the language of a text
  • languages() - List all supported languages
  • Batch translation (pass an array of strings)
  • Typed exceptions: AuthenticationException, RateLimitException, LangblyException
  • Auto-retry with exponential backoff and Retry-After support
  • PHP 7.4+ compatible, Guzzle 7

Install

composer require langbly/langbly-php

Quick Start

use Langbly\Client;

$client = new Client('your-api-key');
$result = $client->translate('Hello world', 'nl');
echo $result->translatedText; // "Hallo wereld"

Full docs: https://langbly.com/docs