{"id":36281653,"url":"https://github.com/sharpapi/laravel-content-translate","last_synced_at":"2026-01-20T15:01:04.251Z","repository":{"id":331821920,"uuid":"1131197741","full_name":"sharpapi/laravel-content-translate","owner":"sharpapi","description":"Laravel package for SharpAPI.com - laravel-content-translate","archived":false,"fork":false,"pushed_at":"2026-01-09T16:12:31.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T23:58:56.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharpapi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-09T16:12:28.000Z","updated_at":"2026-01-09T16:12:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sharpapi/laravel-content-translate","commit_stats":null,"previous_names":["sharpapi/laravel-content-translate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sharpapi/laravel-content-translate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharpapi","download_url":"https://codeload.github.com/sharpapi/laravel-content-translate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharpapi%2Flaravel-content-translate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28605917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-11T09:06:00.579Z","updated_at":"2026-01-20T15:01:04.170Z","avatar_url":"https://github.com/sharpapi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI Content Translator for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/sharpapi/laravel-content-translate.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-translate)\n[![Total Downloads](https://img.shields.io/packagist/dt/sharpapi/laravel-content-translate.svg?style=flat-square)](https://packagist.org/packages/sharpapi/laravel-content-translate)\n\nThis 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.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require sharpapi/laravel-content-translate\n```\n\n## Configuration\n\nPublish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"sharpapi-content-translate\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'api_key' =\u003e env('SHARP_API_KEY'),\n    'base_url' =\u003e env('SHARP_API_BASE_URL', 'https://sharpapi.com/api/v1'),\n    'api_job_status_polling_wait' =\u003e env('SHARP_API_JOB_STATUS_POLLING_WAIT', 180),\n    'api_job_status_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_POLLING_INTERVAL', 10),\n    'api_job_status_use_polling_interval' =\u003e env('SHARP_API_JOB_STATUS_USE_POLLING_INTERVAL', false),\n];\n```\n\nMake sure to set your SharpAPI key in your .env file:\n\n```\nSHARP_API_KEY=your-api-key\n```\n\n## Usage\n\n```php\nuse SharpAPI\\ContentTranslate\\ContentTranslateService;\n\n$service = new ContentTranslateService();\n\n// Translate text to a different language\n$translatedText = $service-\u003etranslate(\n    'Hello, how are you today?',\n    'Spanish', // target language\n    'friendly', // optional voice tone\n    'casual conversation' // optional context\n);\n\n// $translatedText will contain the translated text as a string\n```\n\n## Parameters\n\n- `text` (string): The text content to translate\n- `language` (string): The target language for translation\n- `voiceTone` (string|null): The tone of voice for the translation (e.g., professional, casual, friendly)\n- `context` (string|null): Additional context to improve translation accuracy\n\n## Response Format\n\n```json\n{\n    \"data\": {\n        \"type\": \"api_job_result\",\n        \"id\": \"5de4887a-0dfd-49b6-8edb-9280e468c210\",\n        \"attributes\": {\n            \"status\": \"success\",\n            \"type\": \"content_translate\",\n            \"result\": {\n                \"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.\",\n                \"to_language\": \"English\",\n                \"from_language\": \"French\"\n            }\n        }\n    }\n}\n\n## Supported Languages\n\nThe service supports a wide range of languages, including but not limited to:\n- English\n- Spanish\n- French\n- German\n- Italian\n- Portuguese\n- Russian\n- Chinese\n- Japanese\n- Arabic\n- And many more\n\n## Credits\n\n- [Dawid Makowski](https://github.com/dawidmakowski)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharpapi%2Flaravel-content-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharpapi%2Flaravel-content-translate/lists"}