I'm having trouble getting the i18n to work on the hero. I have installed:
I18n.default_locale = :de
in my .rb environment and the translation located in config / locales / de.yml works fine on my local machines, but not so on Heroku. Heroka is all in English. I donβt think I need a special gem like the i18n gem, because I donβt have it either on my local machine. Maybe someone has a solution?
Try setting a local default value like this in the config.environment.rb file:
Rails::Initializer.run do |config| # ... config.i18n.default_locale = :de end
The only solution I found for me, on heroku, was installing it manually in the application controller.
application_controller.rb
before_filter :set_locale def set_locale I18n.locale = 'fr-QC' || I18n.default_locale end
amuses
Source: https://habr.com/ru/post/899931/More articles:Android notification from BroadcastReceiver - androidHeroku doesn't work - ruby-on-railsThe same enumeration and variable names - javaNotification pending notifications - androidC # startup process with reduced privileges from the UAC administration level process - c #heroku I18n locale differs from default_locale, works fine locally - ruby-on-rails128-bit shifts using assembly language? - performanceDrawText with DT_CALCRECT - Is there a way to calculate the height of a rectangle WITHOUT changing the width (with large lines)? - winapiemacs slime: What is equivalent to an up arrow in shells? - lispHow do you programmatically force scroll using UIScrollView? - iosAll Articles