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 domains and slugs at the same time #21

Open
ivanvermeyen opened this issue Jan 17, 2020 · 0 comments
Open

Use domains and slugs at the same time #21

ivanvermeyen opened this issue Jan 17, 2020 · 0 comments
Labels
feature request New feature or request

Comments

@ivanvermeyen
Copy link
Contributor

Enable the combined use of localized domains and slugs.

Fictional use case:

Locale URL Description
en https://example.be/en English
nl https://example.be/nl Dutch
nl_BE https://example.be/nl Belgium, Dutch
fr_BE https://example.be/fr Belgium, French
nl_NL https://example.nl/ Netherlands, Dutch (no slug)
fr_FR https://example.fr/ France, French (no slug)

Possible configuration (related to suggested configuration in #20):

'supported-locales' => ['en', 'nl', 'nl_BE', 'fr_BE', 'nl_NL', 'fr_FR'],

'domains' => [
    'en' => 'example.be',
    'nl' => 'example.be',
    'nl_BE' => 'example.be',
    'fr_BE' => 'example.be',
    'nl_NL' => 'example.nl',
    'fr_FR' => 'example.fr',
],

'slugs' => [
    'en' => 'en',
    'nl' => 'nl',
    'nl_BE' => 'nl',
    'fr_BE' => 'fr',
    'nl_NL' => null, // no slug
    'fr_FR' => null, // no slug
],

This is just a first idea of how this might look. Will need to work out if any misconfigurations can happen (we need to be able to detect the locale based on the URL) and how to handle that.

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

No branches or pull requests

1 participant