astrolicious / i18n

Yet another i18n integration for Astro with server and client utilities, type safety and translations built-in.
https://astro-i18n.netlify.app/
MIT License
48 stars 3 forks source link

Take trailing slash into account #24

Closed florian-lefebvre closed 4 weeks ago

nojaf commented 3 months ago

Hi there, shot in the dark, but right now I don't get my language when I browser to /fr only when I go to /fr/.

image

Would this related to this bug?

florian-lefebvre commented 3 months ago

mmh I'm not sure because you don't have a special trailingSlash configuration. Would you mind providing a minimal reproduction? (in a repository, there are issues with Stackblitz)

nojaf commented 3 months ago

This is what I have so far: https://github.com/nojaf/astro-translations-repro

dsijakovski98 commented 2 months ago

Having the same issue, cannot get locales to load for /mk only for /mk/. Also, looks like it is the same behaviour in the Demo app.

If can be made so that it recognizes the locale without the trailing slash, would be awesome 🙏

amosbastian commented 1 month ago

Same as above. It only loads the default locale's translations if you have trailingSlash set to e.g. never. Would be great to get this fixed 🙏

florian-lefebvre commented 1 month ago

If someone wants to contribute this fix, please do! I don't have near plans to address it

nojaf commented 4 weeks ago

Sounds reasonable, any pointers or steps on how one would debug or run this locally?