PHPackages                             sharpapi/laravel-content-translate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sharpapi/laravel-content-translate

ActiveLibrary[API Development](/categories/api)

sharpapi/laravel-content-translate
==================================

AI Content Translation for Laravel powered by SharpAPI.com

v1.0.3(1mo ago)0268↓66.7%1MITPHPPHP ^8.1

Since Jan 9Pushed 2mo agoCompare

[ Source](https://github.com/sharpapi/laravel-content-translate)[ Packagist](https://packagist.org/packages/sharpapi/laravel-content-translate)[ Docs](https://github.com/sharpapi/laravel-content-translate)[ RSS](/packages/sharpapi-laravel-content-translate/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (5)Used By (1)

AI Content Translator for Laravel
=================================

[](#ai-content-translator-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1694ef884b2d27db5ebc77ba50047ad76d9d2cd74271b55e38b6e1aa164ebed5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686172706170692f6c61726176656c2d636f6e74656e742d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-content-translate)[![Total Downloads](https://camo.githubusercontent.com/b8cb409cd82d64af7b2bc9a8b91d816d1e08f8d089f50a8a03168b5d9a4f43c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73686172706170692f6c61726176656c2d636f6e74656e742d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sharpapi/laravel-content-translate)

This package provides a Laravel integration for the SharpAPI Content Translation service. It allows you to translate text to different languages with AI-powered accuracy, which is perfect for multilingual applications, content localization, and more.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require sharpapi/laravel-content-translate
```

Configuration
-------------

[](#configuration)

Publish the config file with:

```
php artisan vendor:publish --tag="sharpapi-content-translate"
```

This is the contents of the published config file:

```
return [
    'api_key' => env('SHARP_API_KEY'),
    'base_url' => env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),
    'api_job_status_polling_wait' => env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),
    'api_job_status_polling_interval' => env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),
    'api_job_status_use_polling_interval' => env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),
];
```

Make sure to set your SharpAPI key in your .env file:

```
SHARP_API_KEY=your-api-key

```

Usage
-----

[](#usage)

```
use SharpAPI\ContentTranslate\ContentTranslateService;

$service = new ContentTranslateService();

// Translate text to a different language
$translatedText = $service->translate(
    'Hello, how are you today?',
    'Spanish', // target language
    'friendly', // optional voice tone
    'casual conversation' // optional context
);

// $translatedText will contain the translated text as a string
```

Parameters
----------

[](#parameters)

- `text` (string): The text content to translate
- `language` (string): The target language for translation
- `voiceTone` (string|null): The tone of voice for the translation (e.g., professional, casual, friendly)
- `context` (string|null): Additional context to improve translation accuracy

Response Format
---------------

[](#response-format)

```
{
    "data": {
        "type": "api_job_result",
        "id": "5de4887a-0dfd-49b6-8edb-9280e468c210",
        "attributes": {
            "status": "success",
            "type": "content_translate",
            "result": {
                "content": "The rise in sea levels threatens to engulf the Maldives where fresh water is already starting to run out, but the new president of the Indian Ocean archipelago refuses any relocation of its population abroad. In an interview with AFP, President Mohamed Muizzu, a 45-year-old civil engineering graduate trained in the United Kingdom, instead promises an ambitious program of land rehabilitation and island elevation, which environmental organizations criticize.",
                "to_language": "English",
                "from_language": "French"
            }
        }
    }
}

## Supported Languages

The service supports a wide range of languages, including but not limited to:
- English
- Spanish
- French
- German
- Italian
- Portuguese
- Russian
- Chinese
- Japanese
- Arabic
- And many more

## Credits

- [Dawid Makowski](https://github.com/dawidmakowski)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

4

Last Release

52d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b500dd3d9b470b50b1ed911cd24a6fdcce51dd97dceb4f97879f727a14495a8?d=identicon)[dawid-makowski](/maintainers/dawid-makowski)

---

Top Contributors

[![makowskid](https://avatars.githubusercontent.com/u/6271194?v=4)](https://github.com/makowskid "makowskid (3 commits)")

---

Tags

phpapilaravellanguagetranslationmultilingualRESTful APISharpAPIartificial intelligencenatural language processingsoftware developmentContent Analysisai apiAI-poweredapi integrationai capabilitiesContent Generation

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sharpapi-laravel-content-translate/health.svg)

```
[![Health](https://phpackages.com/badges/sharpapi-laravel-content-translate/health.svg)](https://phpackages.com/packages/sharpapi-laravel-content-translate)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
