1

我有一个文件 config/locales/events.en.yml:

en:
  im_going: im going

我希望它是

en:
  im_going: i'm going

但是当我这样做时,我会在代码的随机部分中遇到几个错误。有人知道如何用撇号国际化字符串吗?

在此先感谢,亚历克斯

4

2 回答 2

2

从这里:http: //yaml.org/spec/current.html#id2534365

en:
  im_going: 'i''m going'
于 2014-05-30T22:27:58.487 回答
2

This is one of those little things that have always annoyed me about YML. Anyway, quote your string and everything should be okay:

en:
  im_going: "i'm going"

Hope that helps!

于 2012-08-23T23:19:18.743 回答