Heroku语言区域设置无法正常工作

它看起来像我在heroku上的语言区域设置不起作用。

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

我的看法:

  :short %> 

地点:

 en: hello: "Hello world" views: pagination: previous: "« Tilbage" next: "Næste side »" # 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: "" 

我有一个很可能一样的问题。

我通过从本地化文件中取出字节顺序标记来修复它。

我打开的问题中的更多信息: heroku没有加载语言文件

您的区域设置数据是英语(en),但我认为您的字符串是挪威语(否)。 您的应用程序运行的区域设置是什么? 您的浏览器要求的语言是什么? 如果为挪威语添加no:部分会发生什么?

作为一个疯狂的猜测,我认为你的应用程序最终试图使用挪威语语言环境,但它找不到挪威语的任何配置,所以它使用硬编码的en_US作为后备。 我还猜测你的机器上的一切都能解决,因为默认的后退区域设置是no_NO; 如果您更改en: locale部分中的短日期格式,本地计算机上会发生什么?

更多的猜测在这里得到答案,但这有点太大而且涉及评论。