Questions tagged [globalize3]

Globalize3 is a popular Ruby on Rails extension that aids development of the global-ready web applications.

Globalize3 is a popular Ruby on Rails extension that aids development of the global-ready web applications.

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 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.

83 questions
1
vote
0 answers

How to get the translation of the object in a globalize3 with fallback

I wanna get the translation with fallback. My method is not suitable: 1) Change locale(I18n.locale = :de) 2) Get translations(Place.find(:id)) 3) ... 4) Not profit! UPDATE: I find solution! before_filter :set_locale def set_locale locale =…
xdsemx
  • 1,159
  • 1
  • 8
  • 14
1
vote
1 answer

Globalize3 - two translations in one view

I use gem globalize3. I want to get a translation posts in two languages​​, first in English and then in Russian in one index view. And I want to post that is not in English, was located below in Russian after the English posts. My problem is that…
nilid
  • 372
  • 2
  • 12
1
vote
1 answer

Ruby with nested form and globalize3

I've had a problem with our web application, since Wednesday. I've been trying to fix it, but I have run out of ideas. So, I've created a mini Ruby on Rails application that reproduces my problem to be easy for everyone to understand, and hopefully…
Davidslv
  • 634
  • 1
  • 7
  • 18
1
vote
2 answers

globalize3 configuration I18n.locale variable

take a look into my model and my migration i only have one attribute to test the globalize3 gem class Car < ActiveRecord::Base attr_accessible :name translates :name end my migration looks like the following class CreateCars <…
Kamrul Hassan
  • 294
  • 1
  • 2
  • 13
0
votes
1 answer

Rails Globalize3 Get all objects regardless of locale

I have an Article model and I would like to retrieve all entries regardless of their locale. Article.all returns only the original objects (those stored in the articles table) without their translations (translatable fields in the…
0
votes
2 answers

Globalize3 english translations in posts or post_translations?

I have an existing site with fields in post.title and post.body. After I installed Globalize3, post.title returns blank. Is there a way that I don't need to migrate the existing information to post_translations?
0
votes
1 answer

How to keep UI and Content Localisation separate in ActiveAdmin

We need to start delivering dynamic content in multiple languages with our different apps. There are two types of localisation that should be considered: UI localisation and Content localisation. UI localisation is the language the interface is…
0
votes
1 answer

Globilize updates all translations, except the 'title'

I'm using Globalize 3.1 and globalize-accessors on an old rails 3.2 project, in order to store some translated fields, in 3 languages. I have two models, a Company with many basic details [title, address, lat, lng, image etc], where I translate the…
stefkas
  • 81
  • 1
  • 1
  • 6
0
votes
1 answer

ActiveRecord object does not save translated values with paper trail gem

We are using Rails 3.2.15 and Globalize gem for I18N. We recently integrated Paper Trail Gem for auditing Model changes. We observed that whichever model fields are marked as translated are not updated in DB. e.g. class MyModel <…
Sid
  • 4,893
  • 14
  • 55
  • 110
0
votes
1 answer

Localize / Translate different values for one model field

I use to have roles as an Enum and translate them was easy... I've adopted rolify and now things got more complicated... Rolify adds a table "Roles" to the RoR app, where you have, for example, the field "name" of the role. So I have 4…
lbramos
  • 327
  • 1
  • 6
  • 19
0
votes
1 answer

Limit globalize_accessor locales to arguments from controller/view

I'm using the globalize_accessor gem to render a form that has multilingual inputs for a :name field, and would like to limit the languages a user can input based on which Languages have been passed as arguments to the globalize_attribute_names…
Luke Keller
  • 2,488
  • 3
  • 20
  • 23
0
votes
1 answer

Globalize for Currencies

I have a table in html of prices and I need to change all the prices for a currency (with the currency symbol). I thought use the jquery Globilize (I don't know if is the best... please advice if I'm wrong) but I don't know what to download and…
0
votes
1 answer

hstore_translate existing data migration

I've added hstore_translate to a Rails4 project with existing data. class Product < ActiveRecord::Base translates :subtitle, :description end config.i18n.fallbacks = true class AddTranslationColumnsToProducts < ActiveRecord::Migration def…
0
votes
1 answer

Ruby on Rails NoMethodError "undefined method `translates'"

I have an application in local that works great, but when I push on server it crash with this error: `NoMethodError in PagesController#index undefined method `translates' for #` It may be caused by the globalize3 gem, but I…
0
votes
1 answer

globalize3 - Query translated attribute

I have 2 models: class Gender < ActiveRecord::Base translates :name has_many :products end class Product < ActiveRecord::Base translates :description belongs_to :gender end After integrating with globalize3 I cannot figure out how to get…
maxhungry
  • 1,863
  • 3
  • 20
  • 28