Download the PHP package translated/lara-sdk without Composer

On this page you can find all versions of the php package translated/lara-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 lara-sdk

Lara PHP SDK

PHP Version

This SDK empowers you to build your own branded translation AI leveraging our translation fine-tuned language model.

All major translation features are accessible, making it easy to integrate and customize for your needs.

๐ŸŒ Features:

๐Ÿ“š Documentation

Lara's SDK full documentation is available at https://developers.laratranslate.com/

๐Ÿš€ Quick Start

Installation

Basic Usage

๐Ÿ“– Examples

The examples/ directory contains comprehensive examples for all SDK features.

All examples use environment variables for credentials, so set them first:

Text Translation

Document Translation

Image Translation

Translation Memory Management

Glossary Management

Styleguide Management

๐Ÿ”ง API Reference

Core Components

๐Ÿ” Authentication

The SDK supports authentication via access key and secret:

Environment Variables (Recommended):

๐ŸŒ Translator

Text Translation

Quality Estimation

Use qualityEstimation() to score how well a translation matches its source. Pass a single sentence/translation pair to get a single result, or two parallel arrays to get one result per pair.

๐Ÿ“– Document Translation

Simple document translation

Document translation with status monitoring

Document upload

Document translation status monitoring

Download translated document

๐Ÿ–ผ๏ธ Image Translation

renderTranslated($filePath, $source, $target, $paragraphs, $model = null, $noTrace = false) renders supplied translations without translating them again. Pass null for the source language to omit it. Supported models are overlay, inpainting, generative, and generative_fast; omitting the model uses the API default, generative_fast. Set $noTrace to true to disable request tracing. As with translate, the returned value is a stream resource that the caller must close.

overlay and inpainting require every entry to be an ImageLayoutParagraph, with bbox, linesBboxes, textInfo, and alignment. Generative models accept both ImageParagraph and ImageLayoutParagraph. The API validates paragraph contents; incomplete layout is invalid. Memory and glossary matches are excluded from rendering requests.

includeLayout can be set in the options constructor or with setIncludeLayout(true). When it is true, every entry is an ImageLayoutParagraph containing the complete metadata required by classic rendering. Omitting the option, or setting it to false or null, preserves the text-only response. The independent verbose option (or setVerbose(true)) requests memory and glossary matches.

ImageBBox exposes getTopLeft(), getTopRight(), getBottomRight(), and getBottomLeft() integer coordinate pairs ([x, y]). ImageTextInfo exposes direction (ltr, rtl, or ttb), text color, and background color through getters. Alignment is left, center, or right. The SDK serializes layout using the API's snake_case field names.

๐Ÿง  Memory Management

๐Ÿ“š Glossary Management

๐Ÿ“‹ Styleguide Management

Translation Options

Language Codes

The SDK supports full language codes (e.g., en-US, fr-FR, es-ES) as well as simple codes (e.g., en, fr, es):

๐ŸŒ Supported Languages

The SDK supports all languages available in the Lara API. Use the getLanguages() method to get the current list:

Asset permissions

Memories, glossaries, styleguides, and their share entries expose getPermissionMask() from the API's permission_mask field. Masks use read (r), write (w), export (e), and share (s) positions; - means absent. Supported masks are r---, rw--, r-e-, r--s, rwe-, rw-s, r-es, and rwes.

On memory, glossary, and styleguide resources, getPermissionMask() is optional and is null when omitted by the API, including POST, PUT, and DELETE resource responses. GET list and detail responses report the combined effective mask from the caller's applicable shares. Resources embedded in GET /shares responses report the selected share's stored mask; individual share entries report their own required stored mask.

The legacy permissions field and its read/write compatibility API have been removed. Use getPermissionMask() to inspect the read, write, export, and share bits. Share-entry masks are required, matching the service contract. Resource masks remain optional.

โš™๏ธ Configuration

Error Handling

The SDK provides detailed error information:

๐Ÿ“‹ Requirements

๐Ÿงช Testing

Run the examples to test your setup:

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Happy translating! ๐ŸŒโœจ


All versions of lara-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
ext-json Version *
ext-fileinfo Version *
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 translated/lara-sdk contains the following files

Loading the files please wait ...