Skip to main content
Glama
saddamalsalfi

laravel-skills-multilingual

README.md
---
name: "laravel-multilingual"
title: "Laravel Multilingual Implementation & Localization"
description: "Comprehensive agent workflow and Cursor rule for configuring multi-language support in Laravel, including locale-aware URLs, translation catalogs, JSON Eloquent models, and Filament admin panels"
version: "1.0.0"
author: "Saddam Al-Slfi"
repository: "https://github.com/saddamalsalfi/laravel-skills-multilingual"
license: "MIT"
created_at: "2026-09-12"
---

# Laravel Multilingual Implementation & Localization 🌐🐘

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.22781033.svg)](https://doi.org/10.5281/zenodo.22781033)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Open Plugins Compliant](https://img.shields.io/badge/Open%20Plugins-Compliant-success.svg)](https://open-plugins.com)
[![Cursor Rule](https://img.shields.io/badge/Cursor%20Rule-.mdc-purple.svg)](rules/laravel-multilingual.mdc)
[![Laravel](https://img.shields.io/badge/Laravel-10%20%7C%2011%20%7C%2012%20%7C%2013-red.svg)](https://laravel.com)

A production-grade AI agent skill and **Cursor Rule** engineered to implement and maintain bulletproof internationalization (i18n) and localization (L10n) in modern Laravel applications.

Optimized for **[cursor.directory](https://cursor.directory)**, **[LangChain Hub](https://smith.langchain.com/hub)**, and **[Open Plugins](https://open-plugins.com)**.

---

## šŸŽÆ What This Skill Solves

Localization in Laravel involves complex edge cases: SEO canonical URLs, locale-prefixed routes, translatable Eloquent attributes, Filament admin panels, and queue worker locale leaks.

This skill guides the AI coding assistant through:
- **Zero Security Risk in Web Root:** Forbids exposing translation catalogs in `public/lang/` and enforces `<project-root>/lang/` as the sole authoritative path.
- **SEO & Canonical Routing:** Handles locale prefix routing via `mcamara/laravel-localization`, enforces redirect invariants (`hideDefaultLocaleInURL => true`), and eliminates redirect loops.
- **Admin Panel Isolation:** Completely decouples Filament administration panels from public localized routing while keeping admin language switching seamless via Livewire.
- **Data Integrity:** Manages JSON-backed translatable Eloquent attributes using `spatie/laravel-translatable` without data loss or partial overwrite bugs.
- **Queue & Worker Safety:** Explicitly isolates and resets locale state inside queue workers and asynchronous jobs to avoid cross-tenant locale leakage.
- **RTL & LTR Support:** Enforces correct CSS and typography direction switching for Arabic, Hebrew, and Persian.

---

## šŸ“‚ Repository Structure (Open Plugins Standard)

```text
ā”œā”€ā”€ skills/
│   └── laravel-multilingual/
│       └── SKILL.md                 # Agent skill for Antigravity, Claude Code, etc.
ā”œā”€ā”€ rules/
│   └── laravel-multilingual.mdc     # Optimized rule for Cursor IDE
ā”œā”€ā”€ server.py                        # Universal FastMCP executable server
ā”œā”€ā”€ requirements.txt                 # Pinned dependencies for MCP runtime
ā”œā”€ā”€ Dockerfile                       # Multi-platform OCI rootless container
ā”œā”€ā”€ mcp.json                         # Model Context Protocol configuration
ā”œā”€ā”€ plugin.json                      # Open Plugins manifest
ā”œā”€ā”€ LICENSE                          # MIT License with explicit AI Agent Grant
└── README.md                        # Documentation and usage guides
```

---

## šŸš€ Quick Start & Installation

### 1. Cursor IDE
Copy the rule directly into `.cursor/rules/`:
```bash
mkdir -p .cursor/rules
curl -o .cursor/rules/laravel-multilingual.mdc https://raw.githubusercontent.com/saddamalsalfi/laravel-skills-multilingual/main/rules/laravel-multilingual.mdc
```

### 2. Google Antigravity / Gemini IDE
Place into your workspace under `.agents/skills/`:
```bash
mkdir -p .agents/skills/laravel-multilingual
curl -o .agents/skills/laravel-multilingual/SKILL.md https://raw.githubusercontent.com/saddamalsalfi/laravel-skills-multilingual/main/skills/laravel-multilingual/SKILL.md
```

### 3. Open Plugins CLI
```bash
open-plugins install https://github.com/saddamalsalfi/laravel-skills-multilingual
```

### 4. Universal Executable MCP Server (Claude Desktop, Cursor, Smithery)
This skill runs natively as an executable Model Context Protocol (MCP) server exposing resources (`skill://content`) and tools (`get_guidelines`):

**Claude Desktop Configuration (`claude_desktop_config.json`):**
```json
{
  "mcpServers": {
    "laravel-skills-multilingual": {
      "command": "python",
      "args": ["/path/to/laravel-skills-multilingual/server.py"]
    }
  }
}
```

**Docker Container Run:**
```bash
docker build -t laravel-skills-multilingual .
docker run -i --rm laravel-skills-multilingual
```

---

## šŸ“„ License & Attribution

Authored by **Saddam Al-Slfi** ([@saddamalsalfi](https://github.com/saddamalsalfi)).

Licensed under the **[MIT License](LICENSE)** with a **Special Grant for Artificial Intelligence (AI) Agents & Automated Systems**.

TDQS

A4.3/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of overlapping purposes, and get_guidelines' role is immediately understandable.

Naming Consistency5/5

The one tool name uses a clean verb_noun pattern, get_guidelines, and clearly signals an information-retrieval action.

Tool Count3/5

A single tool feels thin for a skill server, though the narrow guidelines-only scope may justify it. There are no supplementary tools for listing or navigating sections.

Completeness5/5

The tool can retrieve all guidelines or filter by section, covering the main need for procedural and domain rules. No lifecycle operations are expected for a static knowledge resource, and an unfiltered call provides full access.

Maintenance

ActivityMaintained
ResponsivenessNo issues