Laratext banner
edulazaro edulazaro

Laratext

AI community

Description

A Laravel package to easily handle translated texts and translate them via AI or any translation service

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

![Laratext](art/banner.png)

Laratext for Laravel

Tests Latest Stable Version Total Downloads PHP Version License

Introduction

Laratext is a Laravel package designed to manage and auto-translate your application's text strings. In laravel, when using the `__` gettext helper method you specify the translation or the key. Both options have issues. If you specify the key, the file becomes difficult to read, as you don't know what's there. If you specify the text, your translations will break if you change a single character. With Laratext you specify both the key and the text, making it useful and readable.

It also allows you to seamlessly integrate translation services (like OpenAI or Google Translate) into your Laravel application to automatically translate missing translation keys across multiple languages.

It includes these features:

  • Simplifies working with language files in Laravel.
  • Auto-translate missing translation keys to multiple languages.
  • Supports multiple translation services (e.g., OpenAI, Google Translate).
  • Easy-to-use Blade directive (@text) and helper functions (text()).
  • Commands to scan and update translation files.

Requirements

  • PHP 8.2, 8.3, 8.4 and 8.5