Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

andy's avatar

I'd love to see Jeffery"s take on this too but unless he's into developing multi-lingual sites he's probably going to need guidance to as which method is Best Practice at the moment. Google rankings can change at any moment and I've seen a lot over the years about which method is better

xxx.domain.com or domain.com/xxx/ ;-)

However, If he just covered the above 2 methods then I'm pretty sure that most of use would be grateful :-)

zoransa's avatar

This is great idea... also it would be good to make two kinds of examples... let's say that website needs two kinds of translations Product name, description, brand, type, sku... Article title, body, slug...

Lets say each product on every website is the same and only few fields might be translated like name optionally and description always.

For article every language website use own 'article table'

andy's avatar

Does he even stop to comment anymore?

planktons's avatar

This is the only piece i'm missing for my project. I would love to see DB approach on it, where i can use some kind of aliases (hook them up with DB results or alias name with mark, that its a untranslated alias) and auto save them to DB for other people to edit it translation form nice form in admin panel.

So yea +1

davorminchorov's avatar

A lot of people are asking for a localization lesson or even series, but the question is: does Jeffrey know any other language so he can show us how to use it?! :D

1 like
keevitaja's avatar

Hey guys! It is me spamming here again :)

Localized URLs and routing is easy when you do it the right way. There is no need to mess with filters or middleware. Just remove the damn locale slug in public/index.php and you're set for good! Works in every app.

https://github.com/keevitaja/linguist

stephan-v's avatar

+1 Laravel does not seem to have great support for this which I noticed when I wanted to rename my resource url's to a translated url. There is no option for the named routes to keep their original prefix breaking pretty much all the routing.

I would definitely like to see a professional take this on.

davorminchorov's avatar

Isn't it better if you keep the routes in english? Those things are for developers anyway and they probably know english. What you mostly need localization for is the content.

Please or to participate in this conversation.