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

ill-logical's avatar

i18n / localization - is the simplest solution good?

Hi,

I have a simple project. It will run on .com domain, I will not be buying dedicated domains for each language.

There is a simple way I could achieve the routing - dynamically resolve the route name from lang assets

Route::get('/' . __('routes.post'), 'PostController@index');

Within my views, I would make sure they render the correct links based on the runtime locale.

My question is - I have skimmed through the forums. More robust solutions were provided, such as external packages, custom middlewares to handle this.

Is there something fundamentally wrong with this simple approach?

Why would such a solution not be desirable?

Thank you very much for your answers.

0 likes
0 replies

Please or to participate in this conversation.