Home > i18n_emails

i18n_emails

I18n_emails is a project mainly written in ..., based on the MIT license.

The nicer way to create and maintain emails in Rails apps using I18n

= easy_i18n_emails

I18nEmails makes it easy to create and maintain I18n emails in Rails apps.

Using I18n in large Rails apps often results in large and incomprehensible translation files. The idea of splitting up concerns should also apply to translations files and emails in particular and that is why this gem was created.

I18nEmails allows you to create separate translation files for each email (.email) and store them in a nested folder structure mirroring a translation file, for example: config/locales/en/notifier/forgotten_password.email.

The email body content in a .email file is also more readable for both developer and non-technical people then a YAML file.

== Example email:

subject: Forgotten password

heading: It's ok, we all forget our passwords sometimes
# Available interpolation args: username, link

--------------------------------------------

Hi %{username},

Click here to reset your password %{link}.

Have a great day!

== Notes

Anything above the ---- is still parsed as YAML, but anything below it becomes the body of the email (newlines are converted to

tags using simple_format)

== Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

== Contributors

  • Greg Bell http://github.com/gregbell

== Copyright

Copyright (c) 2010 Matt Vague, VersaPay Corporation. See LICENSE for details.