Heroku language does not work

It seems that my language on the hero does not work.

On my local mashine : 1. maj Heroku : 01 May 00:00 

My opinion:

 <%= l vind.udtraekkes, :format => :short %> 

Tongue:

 en: hello: "Hello world" views: pagination: previous: "&laquo; Tilbage" next: "Næste side &raquo;" # active_support date: # See http://sproget.dk/svarbase/SV00000046/ and http://en.wikipedia.org/wiki/Date_formats # either use traditional (2.10.03, 2. oktober 2003): "%e.%m.%y", "%e. %B %Y" # or international ISO 8601 format (2003-10-20): "%Y-%m-%d" # Note: some Windows distributions do not support %e - you may have to use %d instead formats: default: "%d.%m.%Y" short: "%e. %b" long: "%e. %B %Y" day_names: [søndag, mandag, tirsdag, onsdag, torsdag, fredag, lørdag] abbr_day_names: [sø, ma, ti, 'on', to, fr, lø] # Note: unescaped 'on' is parsed as true month_names: [~, januar, februar, marts, april, maj, juni, juli, august, september, oktober, november, december] abbr_month_names: [~, jan, feb, mar, apr, maj, jun, jul, aug, sep, okt, nov, dec] order: - :day - :month - :year time: formats: default: "%e. %B %Y, %H:%M" short: "%e. %B" long: "%A, %e. %B %Y, %H:%M" am: "" pm: "" 
+1
source share
2 answers

I had a problem that could be the same.

I fixed it by pulling the byte order mark from the localization files.

More info in the question I opened: heroku does not load the language file

+2
source

Your locale data is for English (en), but your lines, I think, are Norwegian (no). What language does your application work in? What language is your browser asking for? What happens if you add a no: section for Norwegian?

As a wild hunch, I think your application ends up trying to use the Norwegian language, but it cannot find any configuration for the Norwegian, so it uses the hard-coded material en_US as a backup. I would also suggest that everything works on your computer, because the default default localization is no_NO; what happens on your local machine if you change the short date format in the en: locale section?

More hunches, the answers to which are here, but it was too big and related to the comment.

0
source

Source: https://habr.com/ru/post/899927/


All Articles