更新时间:2023-01-30 10:54:51
我有一个问题,可能是相同的。
我通过取出本地化文件中的字节顺序标记。
更多信息在我打开的问题中: heroku不加载语言文件
It seeems like my language locale on heroku is not working.
On my local mashine : 1. maj
Heroku : 01 May 00:00
My view:
<%= l vind.udtraekkes, :format => :short %>
Locale:
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: ""
I had a problem that could very well have been the same.
I fixed it by taking out the byte order mark from the localization files.
More info in the question I opened: heroku not loading language file