Can we change language automatic based on location?

can we change language automatic based on location?

I have 2 languages in my pimcore site 1) Eng 2) france

English Url: www.demo.com\en
Franch Url : www.demo.com\fr
based on location automatic language switch
can this be possible?

You could use Targeting.

On Marketing->Personalization/Targeting->Global Targeting Rules you could add a Country and a URL of your root document (/) in Conditions of your Targeting Group, and a Redirect to the homepage as an Action. That should, theoretically, work.

Or, you could read the server IP through PHP, and make redirection in the Frontend controller if the IP is from a certain country.

Hope this helps.

1 Like

@pdchaudhary checkout https://github.com/dachcom-digital/pimcore-i18n

1 Like