- 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.