Skip to content
type-bridge-translation-generation logo

Laravel Type Bridge - Translation Generation

type-bridge-translation-generation

Generates TypeScript/JavaScript/JSON translation files from Laravel lang files using the type-bridge:translations command. Use when user says "sync translations to frontend", "generate JS translations", or needs Laravel translation strings available in Vue/JavaScript.

SKILL.md

Full skill instructions

Laravel Type Bridge - Translation Generation

When to use this skill

Use this skill when you need to:

  • Generate frontend translation files from Laravel lang files
  • Convert PHP translation arrays to TypeScript, JavaScript, or JSON
  • Set up i18n libraries with Laravel translations

Overview

This package generates frontend translation files from Laravel's lang files. Check config/​type-bridge.php for discovery paths and output settings.

Available Commands

# Generate translations for a locale
php artisan type-bridge:translations en

# Generate translations as JSON
php artisan type-bridge:translations en --format=json

# Generate translations as JavaScript
php artisan type-bridge:translations en --format=js

# Generate translations as TypeScript
php artisan type-bridge:translations en --format=ts

# Generate "flat" translation keys instead of nested
php artisan type-bridge:translations en --flat

Generate Everything Command

Generate enums, translations, and translators in one command:

# Generate all
php artisan type-bridge:generate

# Generate for specific locale
php artisan type-bridge:generate en

# Limit to specific enums
php artisan type-bridge:generate --enums=Status --enums=App\\Enums\\Role

# Use different format for translations
php artisan type-bridge:generate --translations-format=json

i18n Library Support

The package supports two i18n libraries. Set the target library in config/​type-bridge.php under i18n_library:

  • i18next - Works with i18next, react-i18next, Node.js projects
  • vue-i18n - Works with Vue.js projects using vue-i18n

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View