Forem Creators and Builders 🌱

Discussion on: Standalone language fork

 
yheuhtozr profile image
yheuhtozr • Edited

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...)

Thread Thread
 
leog profile image
Leo Giovanetti

Thank you @ce7in, much appreciated!

 
ce7in profile image
Muhammed Cetin

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.

Thread Thread
 
yheuhtozr profile image
yheuhtozr

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.