Welcome Guest, Not a member yet? Register   Sign In
Routing Advice
#4

(01-07-2021, 01:18 PM)demyr Wrote: @nicojmb Thanks for the suggestion but I believe it is not the thing I need. Because in documentation, for routes, it says

PHP Code:
$routes->get('{locale}/books''App\Books::index'); 

I can understand the "{locale}" part, but it is not "books" in each language. It is different.

books for english pages, it is "libri" for italian or "kitaplar" for Turkish or "bucher" for German. ??

Router doesnt have this level of flexibility right now. the only way you can do this is using multiple routes for each language.

for ex:

PHP Code:
$routes->get('en/books''App\Books::index');
$routes->get('de/bucher''App\Books::index'); 
Reply


Messages In This Thread
Routing Advice - by demyr - 01-07-2021, 03:29 AM
RE: Routing Advice - by nicojmb - 01-07-2021, 07:10 AM
RE: Routing Advice - by demyr - 01-07-2021, 01:18 PM
RE: Routing Advice - by MrWhite - 01-07-2021, 06:42 PM
RE: Routing Advice - by demyr - 01-07-2021, 11:56 PM



Theme © iAndrew 2016 - Forum software by © MyBB