Heroku语言区域设置不起作用 [英] Heroku language locale not working

查看:96
本文介绍了Heroku语言区域设置不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 在我的本地mashine上:1. maj 
Heroku:5月1日00:00

我的看法:

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

区域设置:

  en:
hello:Hello world
views:
分页:
上一个:&; laquo; Tilbage
下一个:Næste旁边& raquo;
#active_support
日期:
#请参阅http://sproget.dk/svarbase/SV00000046/和http://en.wikipedia.org/wiki/Date_formats
#使用传统的(2.10.03,2003年10月2日):%e。%m。%y,%e。%B%Y
#或国际ISO 8601格式(2003-10-20) :%Y-%m-%d
#注意:某些Windows发行版不支持%e - 您可能必须使用%d代替
格式:
默认值:%d 。%m。%Y
short:%e。%b
long:%e。%B%Y

day_names:[sndag,mandag,
abbr_day_names:[sø,ma,ti,'on',to,fr,lø]#注意:未转义的'on'被解析为真
month_names: [〜,januar,februar,marts,april,maj,juni,juli,八月,九月,oktober,十一月,十二月]
abbr_month_names:[〜,jan,feb,mar,apr,maj,jun,jul,
order:
- :day
- :month
- :year

time:
格式:
默认值:%e。 %B%Y,%H:%M
短:%e。 %B
long:%A,%e。 %B%Y,%H:%M
am:
pm:


解决方案

我有一个问题,可能是相同的。



我通过取出本地化文件中的字节顺序标记。



更多信息在我打开的问题中: 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: "&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: ""

解决方案

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

这篇关于Heroku语言区域设置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆