steampixel/simplePHPRouter

multilanguage router

sanater opened this issue · 4 comments

Hi, how can i multi language router this class?

site.com/en
site.com/tr
site.com/fr

Hi,
what about something like this (untested):

Route::add('/([a-z]*)/([a-z-0-9-]*)', function($lang, $page) {
    echo 'Load page '.$page.' with language code '.$lang;
});

thank you

how can i assign variable for default language?

please sample or demo full page?