Project

i17n

0.0
No commit activity in last 3 years
No release in over 3 years
Just take a look at the code and you will see how it works.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

i17n

A little shortcut for I18n t method.

Getting started

Add this to your Gemfile:

gem 'i17n'

Add these lines to your app_controller.rb so it looks like:

class ApplicationController < ActionController::Base

  include I17n::ControllerAdditive

end

Usage

In controllers and views, you can write:

t User # shortcut for `User.model_name.human`
t User, :name # shortcut for `User.human_attribute_name(:name)`
t :hello # shortcut for `t "app.hello"`. It is usefull for app specific terms.

# of course, you still can use I18n in original manner.
t "some.term.deep.inside"