Set locale not only by URI like /en, /ru, /lt but by domain.com, domain.ru, domain.lt
Created 8 years ago by huglester

Hello,

can someone point where to search for this kind of functionality?

Thank you

ryanthompson  —  8 years ago Best Answer

So this is called locale hinting: https://github.com/anomalylabs/streams-platform/blob/master/resources/config/locales.php#L21

By default both sub-domain and URI segment hinting will apply. So yourdomain.com/lt/* will trigger lt locale. Same with lt.yourdomain.com/*.

huglester  —  8 years ago

So if I have different domains, like: webas.lt webas.eu

I would need hint to false, and handle the stuff myself somehow. Thanks.

ryanthompson  —  8 years ago

You could - different domains in the domains table can force a locale. I would have to double check to make sure it's hooked up properly.

It was one of those things I knew I would need but didn't need at the time and might have not finished.

maxximus007  —  7 years ago

This would be very interesting for me too.. Can handle it myself, but it's way cleaner if it's working out of the box.

huglester  —  7 years ago

Is there a recommended way to override a Locale? Like overriding the LocaleServiceProvider or somthing like that.

We need custom locale 'set up'/

Thank you