Yes, I'm exactly stuck at routes.rb. When the locale parameter is optional, the app seems sometimes to take what comes first as username or something that go to look up a nonexistent user like "fr". It prevents me from having a slick second level locale such as example.com/fr/....
Otherwise I have a virtually complete i18n setup covering both Rails and JS code. I cut corners on the JS part so it breaks a several tests but works great in production.
So a single-language instance can be easily deployed, but there is still a big obstacle to full m17n, which is injecting the locale parameter to every hardcoded link in tons of ERBs, otherwise they jump back to the default locale. (Sadly default_url_options only covers a tiny portion of their codebase...)
Yes, I'm exactly stuck at routes.rb. When the locale parameter is optional, the app seems sometimes to take what comes first as username or something that go to look up a nonexistent user like "fr". It prevents me from having a slick second level locale such as
example.com/fr/...
.Otherwise I have a virtually complete i18n setup covering both Rails and JS code. I cut corners on the JS part so it breaks a several tests but works great in production.
So a single-language instance can be easily deployed, but there is still a big obstacle to full m17n, which is injecting the locale parameter to every hardcoded link in tons of ERBs, otherwise they jump back to the default locale. (Sadly
default_url_options
only covers a tiny portion of their codebase...)Thank you @ce7in, much appreciated!
Ok, I got it. I'll examine and modify the routes of your Forem fork, and try to determine if it works. Then, I'll send a pull request to your fork.
Oh thank you for your kind help! My routes.rb currently has a sort of second level locale but not functional.
Also, feel free to ask me when I can be of any help.