Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom subdomain instead of locale string? #16

Closed
exophunk opened this issue Apr 4, 2019 · 2 comments
Closed

Use custom subdomain instead of locale string? #16

exophunk opened this issue Apr 4, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@exophunk
Copy link

exophunk commented Apr 4, 2019

This package looks very promising! I have one question though, is it possible to use custom subdomains? I would like to use

gewinnen.domain.com --> "de"
gagner.domain.com --> "fr",

so not actually having the locale string in the domain, but I would need to map this to the specific locale somehow?

Thanks,

Robert

@pmochine pmochine added the enhancement New feature or request label Apr 4, 2019
@pmochine
Copy link
Owner

pmochine commented Apr 4, 2019

I thought about this. But no. Currently, it's not possible! But I really love the idea.

I'm trying to implement this and I will write back to you.

Thank you :)

@pmochine
Copy link
Owner

Hey Robert, finally I found some time for it. I restructured the whole code a bit, but try if it works for you now.

For your case you just need to add this in the config localization file:

'aliases' => [
    'gewinnen' => 'de', //important: it has to match with an active locale from the supportedLocales list
    'gagner' => 'fr'
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants