locomotivecms/models — pull request #24 by demental (2014-06-10 10:16:19+00:00)
Title: Locale in i18nfield

```!ruby

article1 = Article.new(title: {en: 'Article title', fr: 'Titre article'})
article2 = Article.new(title: {en: 'Other article title', fr: 'Titre autre article'})
resultset = [article1, article2]

decorated = Locomotive::Decorators::I18nDecorator.new(article1)

decorated.current_locale = :fr
decorated.title # => Titre article

decorated.current_locale = :en
decorated.title # => Article title

decorated_result = Locomotive::Decorators::I18nDecorator.decorate(resultset, :fr)

decorated_result.last.title # => Titre autre article
```