2

Working on a rails app in French, however whenever i include an accent on the flash messages it breaks the site.

For example

format.html {redirect_to @message.annonce, notice:"Votre message a été envoyé"}
format.html {redirect_to @message.annonce, notice:"Votre email n'a pas pu être envoyer à cause d'une erreur."}

my config/application.rb looks like this

 config.i18n.default_locale = :fr
 config.encoding = "utf-8"

How does one do about this?

Adrien Coquio
  • 4,810
  • 2
  • 22
  • 36
Benjamin
  • 2,088
  • 2
  • 25
  • 46

1 Answers1

5

You should add # encoding: UTF-8 as the first line of your file to add accent in it.

If this is not working please give us the exception raised.

Adrien Coquio
  • 4,810
  • 2
  • 22
  • 36