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

contextLocale from url fails to match key in translations due to case sensitivity #29

Open
b3rimbau opened this issue Dec 20, 2023 · 0 comments

Comments

@b3rimbau
Copy link

The translation dictionary src/_data/i18n/index.js uses mixed case lookup keys like 'es-ES', but the lookup is being made on the contextLocale that is based on the (lowercase) path value 'es-es' and is consequently failing.

The result is that the i18n filter is falling back to fallbackLocale 'en-GB' which means that nothing using the filter is getting translated - see your own demo at https://eleventy-plugin-i18n-demo.netlify.app/ar-ae/ where both the header navigation ("Homepage", "Posts") and footer language selector labels ("Select language") are all in English.

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

No branches or pull requests

1 participant