-
Notifications
You must be signed in to change notification settings - Fork 2
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
keep in mind i18n #10
Comments
This will require deciding how we want the desired language to be detected:
Personally I prefer the third option, seems to me to be the cleanest. See https://guides.rubyonrails.org/i18n.html#setting-the-locale-from-url-params |
I've started working on a PR (#11 ) to implement a simple translation of the initial "Hello world!" string |
I think I prefer the I think yet another option would be to use a cookie - which is nice in that you don't need to think about it in your URL params or paths. Certainly a good thing to keep in mind. Fortunately, Rails I18n is pretty nice to work with. |
Certainly cookies will come into play, to make the website play nicely with user preferences.
|
A good flow is:
|
That's how I handle it on my wordpress websites, and that's how we handle it on the Pilgrimage Office website. See here: https://stackoverflow.com/a/57378358/394921 |
Also see here: https://guides.rubyonrails.org/i18n.html#setting-the-locale-from-url-params
# config/routes.rb
scope "/:locale" do
resources :books
end
|
Yet another way to handle this, if we are working with vhosts on third level domains, is have a separate third level domain for each language, such as:
|
A good thing to keep in mind from the start is i18n:
https://guides.rubyonrails.org/i18n.html
The text was updated successfully, but these errors were encountered: