I'm from the Netherlands and I'm making a website using Laravel 5.2 in Dutch. I want to be able to use the Route::resource('test', 'testController')
with Dutch names as the methods of the controller. So basically I want to change the following action names:
and so on..
Is this possible and how would I do it? I don't want to create a single route for every possible action. Thanks in advance!
My package is ready for use. Just follow the instructions. Don't forget to set your locale to nl or in the future to another language.
https://github.com/doitonlinemedia/TranslatableRoutes
You can call the resource routes like:
TranslatableRoute::resource('recipe', 'recepten', 'RecipeController');
Where the second argument is the translated name and the first defines the name of your routes.
See also: https://codeneverlied.com/translatable-resource-routes-in-laravel/
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments