laravel-localized-routes icon indicating copy to clipboard operation
laravel-localized-routes copied to clipboard

Map locales to custom slugs

Open ivanvermeyen opened this issue 5 years ago • 3 comments

Add the ability to configure custom slugs values for locales, in addition to localized domains.

Maybe something in the lines of:

'supported-locales' => ['en', 'nl'],

'domains' => [
    'en' => 'en.domain.test',
    'nl' => 'nl.domain.test',
],

'slugs' => [
    'en' => 'english',
    'nl' => 'dutch',
],

If you don't add a slug for a locale, the locale itself can be used, so it is optional. If you don't add a domain for a locale, the default app_url be used, so it is optional.

ivanvermeyen avatar Jan 17 '20 16:01 ivanvermeyen

Also map route name prefix to locales? See #35

ivanvermeyen avatar Apr 17 '21 13:04 ivanvermeyen

I like the idea of slugs, any progress?

mro95 avatar Aug 18 '21 09:08 mro95

Not yet, as there was need for it yet. But I can start thinking about it more seriously :) It will take some time though, depending on the impact this has on the rest of the features.

ivanvermeyen avatar Aug 19 '21 13:08 ivanvermeyen