In what URL segment do you have language? /en/admin/dashboard or /admin/en/dashboard?
- by Shimmi
maybe you are thinking that this is another dump question about language in URL, but I hope it is not! I've red many articles on this, but non of them was dealing with "sections of site" (described bellow).
I am programming a new application platform in laravel/php and I am still not 100% convinced where to put language slug.
There are many places where you can put it - some of them are better some are worse:
example.com/en/article
en.example.com/article
example.com/article?lang=en
My personal choice is to put language after the domain - so the first option in above list.
But what if you are in some special secion like admin or api? where do you put language then?
example.com/en/admin/dashboard
example.com/en/api/v1/user/login
or
example.com/admin/en/dashboard
example.com/api/v1/en/user/login
(in frontend it is left the same: example.com/en/some-article)
what do you preffer? what are cons and pros? One thing is using language in first segments is far more easier to programm than when it have some variants...
P.S. whould you recoment using only en, cs or do it in full power with cz-CZ, en-US ?
thanks for any thoughts!
J.