Home

Awesome

haml-i18n

Haml-i18n provides basic functionality to translate haml templates. Instead of writing %p= I18n.translate('.user_name') from now on you can just write %p User name.

Note that this is a very early version of the plugin. I just developed it to fit one project’s needs. If you find any errors please write an issue or provide a fix directly. Please take a look at Contributing to haml-i18n on how to write a fix.

Installation

Add gem "haml-i18n" to your project’s GEMFILE and run bundle to install haml-i18n and its dependencies.

Usage

You can put your keys in plain text into your haml template:

%p User name

This will try to

If none of these keys exist, the haml template just acts as usual: it renders 'User name'.

Contributing to haml-i18n

Copyright

Copyright (c) 2011 Clemens Helm. See LICENSE.txt for further details.

Thanks to…

Cail for giving me the inspiration and a starting point with haml_i18n for developing this gem.