rails internationalization apostrophe

I have a file config/locales/events.en.yml:

  im_going: im going

And I would like it to be

  im_going: i'm going

But when I do this I get several errors in random parts of code. Does anybody know how to internationalizate a string with apostrophe?

Thanks in advance, alex

preguntado el 24 de agosto de 12 a las 00:08

2 Respuestas

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

  im_going: "i'm going"

Espero que ayude!

Respondido 24 ago 12, 00:08

This only works with me if I then output the translation as raw. Is this always necessary for any any special symbols? - Matías

De aquí: http://yaml.org/spec/current.html#id2534365

  im_going: 'i''m going'

contestado el 30 de mayo de 14 a las 23:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.