rails internationalization apostrophe
Frecuentes
Visto 921 veces
1
I have a file config/locales/events.en.yml:
en:
im_going: im going
And I would like it to be
en:
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
2 Respuestas
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"
Espero que ayude!
Respondido 24 ago 12, 00:08
2
De aquí: http://yaml.org/spec/current.html#id2534365
en:
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 ruby-on-rails ruby internationalization apostrophe or haz tu propia pregunta.
This only works with me if I then output the translation as
raw
. Is this always necessary for any any special symbols? - Matías