Skip to content

tonic20/simple_translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleTranslate

I use this library when need to add translated fields to model.

Installation

Add to Gemfile

gem "simple_translate", :git => "git://github.com/tonic20/simple_translate.git"

Usage

Create model with fields for all locales

class CreateProducts < ActiveRecord::Migration
  def change
    create_table :products do |t|
      t.string :name_ru
      t.string :name_en
      t.timestamps
    end
  end
end

Add to model

class Product
  translate :name
end

About

Very simple database translation plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published