Open broszies opened 2 years ago
Update: Have been experimenting today.
Having the same
It gets more frustrating if I read into the documentation. The "old" documentation still works for 90% of cases: Localizing routes works, but localizing route groups doesnt. Localizing slugs works, localizing models fails. The new documentation might be awesome for developers, but a noob like me would need clear code snippets on how to use this to localize routes, models and URLs. The newest tutorial is from 2018 and references spatie translatable, not macamara.
I know I am complaining about someone spending their free time to help others. Please do not understand me wrong - I value your work and can understand one needs to restructure a project when taking over. However, in its current state its simply incredible hard for me to use the package.
Best to close this single issue. I will come back in a year or two when documentation gets available :D
hey @broszies I ran into a similar problem with the package, the localized routes aren't working in production but they do in local.
since the routes are cached in production, I think it is important to follow the caching guidelines of this package. You can read more about that here.
Not sure if it can fix your issue but it doesn't hurt to try it.
Describe the bug Calling up the page "Test" - added in later - results in an 404, even though the code in web.php, lang/xx/routes.php and the blade are identical. Caches have been flushed with php artisan optimize:clear and route:clear
Expected behavior Adding a page (page.blade.php) into the same (or any other) subfolder of /views, adding a translation in /lang/xx/routes.php and adding a route to it in /routes/web.php should result in the page being loaded as long as the existing pages are loaded, too.
More info:
Route::groups
'localeSessionRedirect', 'localizationRedirect', 'localeViewPath', 'localize'supportedLocales
,useAcceptLanguageHeader
andhideDefaultLocaleInURL
).Additional context Add any other context about the problem here.
Apologies Noob-ish user here, just in despair about not seeing the obvious.
Attachments
website footer footer.blade.txt
web.php web.txt