-
Notifications
You must be signed in to change notification settings - Fork 72
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
I18n.locale is wrong after I install this gem. #163
Comments
What files so you have in |
I have 2 files at |
Strange. Where do you put |
Where do you put I18n.locale? I put it on What do you have in R18n.get? I can call it. it returns a lot of data. |
Show me |
|
What locale will you have in Rails controller in HTTP request from browser with |
I don't send any locale.
|
Put |
|
What Maybe your can create small Rails project to reproduce the problem, do I will not ask you for many tests 😅? |
I just create the project 1 week ago - -" |
my repo https://github.com/piya23300/hopet_r18n URL FOR TEST http://localhost:3000/pet_cards/new all translations is correct except I expect At
but it shows
|
Here are two different problems:
Let’s fix the first one first. Here is current R18n locale choosing for
So, what is your operation system language? Show |
Oh, I see. >< but I think the gem should use http://guides.rubyonrails.org/i18n.html#configure-the-i18n-module
Thank you to help me and Happy New Year 2018 🎉🎉🎉 |
Good question. R18n Rails is compatibility layout. But it is not 100% the same since it try to improve I18n 😊. Because current R18n behavior is public API I can't change it without major version. Do you really need Rails behavior? I can give you small snippet to ignore ENV. |
Yes, I need it. because I think gems shouldn't change the behavior of default Rails configuration. |
Create ActiveSupport.on_load(:after_initialize) do
locale = I18n.default_locale.to_s
if defined? Rails::Console and not defined? Wirble
i18n = R18n::I18n.new(locale, R18n.default_places,
off_filters: :untranslated,
on_filters: :untranslated_bash)
R18n.set(i18n)
else
R18n.set(locale)
end
end it will remove |
Thank you so much. |
My rails version is 5.1.4 and
r18n
gem version isAt
application.rb
before I install
r18n
gemafter I installed
r18n
gemCan you help me?
Thank you in advance.
The text was updated successfully, but these errors were encountered: