<commit_before># Globalize3 [![Build Status](https://travis-ci.org/svenfuchs/globalize3.png?branch=master)](https://travis-ci.org/svenfuchs/globalize3)

Globalize3 is the successor of Globalize for Rails and is targeted at
ActiveRecord version 3.x. It is compatible with and builds on the new
[I18n API in Ruby on Rails](http://guides.rubyonrails.org/i18n.html) and adds
model translations to ActiveRecord.

Globalize3 is much more lightweight and compatible than its predecessor.
Model translations in Globalize3 use default ActiveRecord features and no longer
limit any ActiveRecord functionality.

## Requirements

* ActiveRecord > 3.0.0
* I18n

## Installation

To install Globalize3 with its default setup just use:

gem install globalize3

When using bundler put it in your Gemfile:

```ruby
source 'https://rubygems.org'

gem 'globalize3'
```

## Model translations

Model translations allow you to translate your models' attribute values. E.g.

```ruby
class Post < ActiveRecord::Base
  translates :title, :text
end
```

Allows you to translate the attributes :title and :text per locale:

```ruby
I18n.locale = :en
post.title # => Globalize3 rocks!

I18n.locale = :he
post.title # => גלובאלייז2 שולט!
```

In order to make this work, you'll need to add the appropriate translation tables.
Globalize3 comes with a handy helper method to help you do this.<commit_msg>Documents how to get past bundler issues in rails 4 per https://github.com/svenfuchs/globalize3/issues/196<commit_after># Globalize3 [![Build Status](https://travis-ci.org/svenfuchs/globalize3.png?branch=master)](https://travis-ci.org/svenfuchs/globalize3)

Globalize3 is the successor of Globalize for Rails and is targeted at
ActiveRecord version 3.x. It is compatible with and builds on the new
[I18n API in Ruby on Rails](http://guides.rubyonrails.org/i18n.html) and adds
model translations to ActiveRecord.

Globalize3 is much more lightweight and compatible than its predecessor.
Model translations in Globalize3 use default ActiveRecord features and no longer
limit any ActiveRecord functionality.

## Requirements

* ActiveRecord > 3.0.0
* I18n

## Installation

To install Globalize3 with its default setup just use:

gem install globalize3

When using bundler put it in your Gemfile:

```ruby
source 'https://rubygems.org'

gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4'
gem 'paper_trail', github: 'airblade/paper_trail', branch: 'master'
```

## Model translations

Model translations allow you to translate your models' attribute values. E.g.

```ruby
class Post < ActiveRecord::Base
  translates :title, :text
end
```

Allows you to translate the attributes :title and :text per locale:

```ruby
I18n.locale = :en
post.title # => Globalize3 rocks!

I18n.locale = :he
post.title # => גלובאלייז2 שולט!
```

In order to make this work, you'll need to add the appropriate translation tables.
Globalize3 comes with a handy helper method to help you do this.
{'fraction_non_alphanumeric': 0.08921933085501858, 'fraction_numerical': 0.019939168638053395, 'mean_word_length': 4.88469184890656, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1133981', 'n_tokens_mistral': 968, 'n_tokens_neox': 897, 'n_words': 348}