Download the PHP package matecat/lara-php without Composer
On this page you can find all versions of the php package matecat/lara-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matecat/lara-php
More information about matecat/lara-php
Files in matecat/lara-php
Package lara-php
Short Description Matecat Lara SDK for PHP
License MIT
Homepage https://laratranslate.com/
Informations about the package lara-php
Lara PHP SDK
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:
- Text Translation: Single strings, multiple strings, and complex text blocks
- Document Translation: Word, PDF, and other document formats with status monitoring
- Translation Memory: Store and reuse translations for consistency
- Glossaries: Enforce terminology standards across translations
- Language Detection: Automatic source language identification
- Advanced Options: Translation instructions and more
๐ 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
- text_translation.php - Complete text translation examples
- Single string translation
- Multiple strings translation
- Translation with instructions
- TextBlocks translation (mixed translatable/non-translatable content)
- Auto-detect source language
- Advanced translation options
- Get available languages
- Detect language
Document Translation
- document_translation.php - Document translation examples
- Basic document translation
- Advanced options with memories and glossaries
- Step-by-step translation with status monitoring
Translation Memory Management
- memories_management.php - Memory management examples
- Create, list, update, delete memories
- Add individual translations
- Multiple memory operations
- TMX file import with progress monitoring
- Translation deletion
- Translation with TUID and context
Glossary Management
- glossaries_management.php - Glossary management examples
- Create, list, update, delete glossaries
- CSV import with status monitoring
- Glossary export
- Glossary terms count
- Import status checking
๐ง API Reference
Core Components
๐ Authentication
The SDK supports authentication via access key and secret:
Environment Variables (Recommended):
๐ Translator
Text Translation
๐ Document Translation
Simple document translation
Document translation with status monitoring
Document upload
Document translation status monitoring
Download translated document
๐ง Memory Management
๐ Glossary 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:
โ๏ธ Configuration
Error Handling
The SDK provides detailed error information:
๐ Requirements
- PHP 7.4 or higher
- Composer
- Valid Lara API credentials
๐งช 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-php with dependencies
ext-curl Version *
ext-json Version *