Would it be possible to have a cleaner site setup without all those 'locale' subfolders in the webroot? Somehow it looks like there's something similar already done here (https://github.com/craftcms/cms/tree/master-v2/src/services/HttpRequestService.php#L99) if I'm not wrong, wouldn't it be nicer to also just remove the locale if one is detected?
Bonus question :) : Where in the hell is the actual Entry Slug -> Template resolving done? I know there's a lot of stuff happening with filters, action and resource requests. The closest I could get is that here the template/render controller gets triggered (https://github.com/craftcms/cms/tree/master-v2/src/framework/web/CWebApplication.php#L274) which in the end resolves to the action render method in the TemplatesController (https://github.com/craftcms/cms/tree/master-v2/src/controllers/TemplatesController.php#L50), already with the correct $template parameter set.
Could someone guide me in a direction here?
init
function... what are we supposed to be looking at? Confused./webroot/en/index.php
being responsible forhttp://example.com/en
? And why should the folder (incl.index.php
) be removed, if the locale is detected?