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

Localizater Laravel Package

getsupercode/localizater

Localizater is a lightweight Laravel package for adding multilingual support to your app. It simplifies managing translations, switching between languages, and keeping localized content organized, so you can ship multi-language projects with minimal configuration and less boilerplate.

View on GitHub
Deep Wiki
Context7

Getting Started

Read this first: the package is archived. Last release was September 2020, and it has not been maintained since. Before you composer require anything, confirm the repo still resolves against your Laravel version — a 2020-era composer.json typically pins illuminate/* to ^6.0|^7.0|^8.0 and will refuse to install on Laravel 10/11 without --ignore-platform-reqs (which you should not do in production).

Minimal steps (assuming it installs at all):

  1. composer require getsupercode/localizater
  2. Check whether the service provider is auto-discovered (extra.laravel.providers in its composer.json). If not, register it in config/app.php.
  3. Publish any config with php artisan vendor:publish --provider="GetSuperCode\Localizater\..." — inspect the package's src/ first to find the exact provider FQCN, since the README is likely stale.
  4. Define your supported locales (typically config/app.php → available_locales or the package's own config file).
  5. Wrap your route file(s) in the package's locale-prefixing helper instead of Route::group.

The first use case is the one the description promises: instead of writing

foreach (config('app.locales') as $locale) {
    Route::prefix($locale)->group(function () {
        Route::get('/', ...);
    });
}

by hand, you hand a route group to the package and it registers one copy per locale with the locale segment already in the URI, plus (usually) middleware to set App::setLocale() from the prefix. That is essentially the whole feature. Before adopting it, skim src/ — if the implementation is under ~200 lines, you are better off copying the pattern into your own routes/web.php than adding a dead dependency.

Implementation Patterns

Because the package is thin, the useful patterns are about how you wire locale-prefixed routing into a real app, not about exotic package APIs.

Centralized locale list, single source of truth. Keep supported locales in one config array and drive both the route registration and the language switcher from it. If the package reads from its own config, mirror or alias it to config('app.locales') so nothing else in your app has to know the package exists.

Group everything under the prefix, including the fallback. A common pattern is to have the default locale live at the unprefixed root (/, /about) and other locales at /fr, /de. Decide this up front: "all locales prefixed" (/en/about) is simpler to reason about, cache, and canonicalize; "default unprefixed" is friendlier for SEO but requires redirect logic in middleware. The package's own convention (inspect the README) will push you one way — don't fight it, but don't let it silently dictate your canonical URLs.

Locale resolution middleware order. Whatever the package registers to set the locale must run after StartSession/SubstituteBindings only if it depends on the session; typically it should run early (before route model binding and before any localized validation messages) so __() calls and App::setLocale() reflect the URL. Verify the provider's middleware group placement — archived packages often register into web via Route::middleware('web')->group(...), which can double-apply middleware.

URL generation discipline. Wrap route() in a small helper that injects the current locale as a parameter, or ensure every named route call passes app()->getLocale(). A route named about registered once per locale will resolve to whichever definition was loaded last unless the locale is passed as a parameter — this is the single most common bug with this pattern. If the package exposes something like localized_route(), use it consistently; otherwise write your own and forbid bare route() in review.

Language switcher. Point the switcher at the same named route with a different locale parameter so users stay on the equivalent page:

route(Route::currentRouteName(), array_merge(
    request()->route()->parameters(),
    ['locale' => $newLocale]
));

Confirm whether the package's routes take the locale as a route parameter ({locale}) or only as a literal prefix — this changes the helper signature and whether route() can rewrite it.

Gotchas and Tips

  • Archived means abandoned. No security fixes, no Laravel-version bumps, no PHP 8.2+ typing fixes. Treat this as "vendored code you happen to have pulled from Packagist," not a supported dependency. Pin the exact version and record the decision.
  • Composer constraint hell. Expect composer require to fail on modern Laravel. Do not reach for --ignore-platform-reqs; if the package's illuminate/support constraint is ^6.0|^7.0|^8.0, the APIs it calls (e.g. Route::prefix, URL::defaults) may have changed behavior even if the symbols still exist. Read the actual source before forcing resolution.
  • Route caching. Test php artisan route:cache and route:clear explicitly. Packages that register routes programmatically at boot time often fail once routes are cached, or register duplicates when the provider boots twice (Octane, or provider listed both in composer.json and config/app.php). Run under php artisan serve first, then under the cached setup, and compare php artisan route:list.
  • Duplicate route registration. If the package also registers routes itself and you call its helper, you get every locale twice; the second wins silently. Run route:list and count.
  • APP_URL and default locale. Set URL::defaults(['locale' => config('app.locale')]) early (in a service provider) if you go the unprefixed-default-locale route, otherwise route() helpers generate URLs missing the segment.
  • Fallback locale masking. config('app.fallback_locale') silently serves the fallback when a translation key is missing, which makes it look like locale switching isn't working. Test with a bogus key and check app()->getLocale() in artisan tinker or a debug route before blaming the routing.
  • SEO. Emit <link rel="alternate" hreflang="..."> for each locale and a canonical tag pointing at the correctly-prefixed URL. The package won't do this; a locale-prefix routing layer without it is an SEO liability (duplicate content across /en/about and /about).
  • Redirects lose the locale. Auth redirects, Route::redirect(), and 301s that go to route('home') will drop back to the default locale. Audit every redirect target once the prefix layer is in.
  • Extension points are what you'd expect, and limited. Most such packages expose a config file of locales and a service provider you can extend() or override bindings for the locale resolver. If you need custom resolution (Accept-Language header, user preference, subdomain), you will end up writing middleware anyway — so scope a one-afternoon replacement against native Route::group(['prefix' => '{locale}']) before committing to the package.

Bottom line: with 50 stars, a 0.205 score, and an archived state, this is a "learn the pattern, skip the dependency" package. The routing pattern is about 30 lines. Add it as a dependency only if you have a hard constraint forcing it, and then vendor/ fork it and strip the Composer Laravel constraints so your CI actually installs.

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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource