Replies: 1 comment
-
Use the Optional Segments feature. Your routes should start with the Then in your loader, you'll do: export function loader({ params }: LoaderFunctionArgs) {
const lang = params.lang ?? 'bg' // default lang is bg
//...
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
This is a i18n issue. My site needs to support 3 languages - bg, en, and de. I want to make the paths like this:
I've created my own tools for the translations. They are very light-weight and simple. That's why I don't want to use remix-i18n or any other i18n library. I just want to get the locale from the URL path in my root.tsx so I can pass it to my context that handles the translations.
I am not sure how to trick Remix into this as Remix uses the file system structure for routing. I also don't want to do any bad hacks to get there :)
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions