Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Translatable Routes

Laravel Translatable Routes Laravel Package

wotz/laravel-translatable-routes

A Laravel package for translatable routes that lets you define localized URL segments and route translations, so links adapt to each supported language. Simplifies multilingual, SEO-friendly routing within Laravel’s existing route system.

View on GitHub
Deep Wiki
Context7

Laravel Translatable Routes adds localized URLs and route names to Laravel applications, letting each supported locale expose its own path segments without duplicating route definitions. Define translations once and generate links, redirects, and language-aware navigation consistently.

  • Localized route paths with locale-specific segments
  • Translatable route names for route() and redirects
  • Locale-aware URL generation and current-locale helpers
  • Seamless integration with Laravel’s router and middleware
  • Configurable locale mapping and fallback behavior
Frequently asked questions about Laravel Translatable Routes
How do I install wotz/laravel-translatable-routes?
The expected integration is a Composer install, an auto-discovered service provider, published config declaring supported locales and the translation source, and locale-detection middleware. Confirm the exact publish tags and middleware names against the repository before shipping. The package metadata provided does not include a README, so verify the setup steps directly.
Does wotz/laravel-translatable-routes support Laravel 10, 11, and 12?
The technical evaluation presumes Laravel 10+ on PHP 8.1+, but the package metadata does not provide a verified support matrix. Check composer.json constraints and repository tags before adopting. Treat any future-dated release metadata as unconfirmed until reconciled with actual tags.
Does it translate route path segments, route names, or both?
The package description says it adds locale-aware, translatable route URLs with per-locale slugs and paths, but the evaluation flags whether route names are also localized as unverified. Localized path segments with stable route names are cheaper because localizing names breaks route() call sites and JavaScript bridges such as Ziggy. Verify this before designing call sites.
Does route model binding work with translated slugs?
The evaluation lists localized route model binding as an unverified risk, meaning it is not confirmed whether a URL such as /de/produkte/roter-schuh resolves to a Product. The package description does not confirm slug-based binding behavior. Test this explicitly with your own models before relying on it in production.
Will it work with php artisan route:cache?
Route caching is flagged as an unverified area because DB- or file-resolved translations at request time are a classic cache-poisoning point. The provided context does not document how translation resolution behaves under route:cache. Run route:cache in staging and verify every locale URL resolves identically afterward.
How does it handle a missing translation for a locale?
The evaluation explicitly asks whether missing translations produce a 404, a default-locale URL, or an exception, so this behavior is not documented in the provided context. Decide your fallback policy before launch because it affects SEO and user experience. Add tests for missing slugs in every supported locale.
Is wotz/laravel-translatable-routes production-ready?
Treat it as unvetted source code you are evaluating rather than a library you are adopting. The assessment reports 0 stars, 0 dependents, a single maintainer, no security advisory history, and no evidence of CI or coverage. It may suit a pilot, but production use requires your own test coverage and a fork plan.
How does it compare to mcamara/laravel-localization?
mcamara/laravel-localization is described as mature for locale-prefixed route groups, while wotz/laravel-translatable-routes focuses on translating route segments per locale. The evaluation suggests comparing both plus a slug-translation trait against a hand-rolled route group per locale, which may take one to two days. Choose based on whether slug-level translation ergonomics justify an unvetted dependency.
Can I use it with Ziggy, Inertia, Livewire, or Blade?
The package composes with Blade, Inertia, or Livewire as long as URL generation flows through Laravel's route() helper rather than hardcoded strings. If route names are localized, frontend bridges such as Ziggy and @routes would force a contract change. Confirm whether names or only URIs are localized before wiring the frontend.
How should I test translatable routes before deploying?
Build tests that hit every locale URL, run route:cache and re-test, exercise route model binding with translated slugs, and check signed URLs, pagination links, and sitemap or hreflang output. The evaluation warns that silent URL-generation drift after a minor Laravel upgrade is the dominant risk. Add a test that pins the expected localized URL for each route and locale.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo