Questions tagged [globalize]

Globalize is the I18n de-facto standard library for model/data translation in Ruby on Rails. It replaces Globalize3 and works with both Rails 3 and Rails 4.

Globalize is the I18n de-facto standard library for model/data translation in Ruby on Rails. It replaces Globalize3 and works with both Rails 3 and Rails 4.

Globalize replaces the (no longer supported) Globalize3 gem and is targeted at ActiveRecord 4.x, but also supports ActiveRecord 3.x. It is compatible with and builds on the I18n API in Ruby on Rails and adds model translations to ActiveRecord.

Major version numbers in Globalize now correspond to those in ActiveRecord, so Globalize 3.x for ActiveRecord 3.x and Globalize 4.x for ActiveRecord 4.x.

137 questions
0
votes
1 answer

How to use pg_search with globalize?

I use a pg_search gem for searching in my rails app. The main model in my app was: class Book < ActiveRecord::Base include PgSearch pg_search_scope :search_everywhere, against: [:author, :title, :description] end It worked perfect with @books…
0
votes
0 answers

Why doesn't saved data with translates option in Rails 4.2?

In the Rails 4.2 app I'm using globalize gem: gem 'globalize', '~> 5.0.0' gem 'globalize-versioning', '~> 0.1.0' gem 'paperclip-globalize3', '~> 2.2.0' I have model Benefit that has field with translation: class Benefit < ActiveRecord::Base …
Nike0
  • 55
  • 9
0
votes
1 answer

How to specify the I18n locale for registered users

I'm making an app that uses globalize to translate the db. I need to be able to create an UI for admins to be only able to access specific locales so they can translate them. I am thinking two ways to do this. 1- use Pundit (see below), or 2- after…
0
votes
2 answers

Ruby on Rails 4.2 with Globalize gem for UUID table

I use Globalize gem for my rails 4.2 project, and the table primary ID is UUID in postgre. Here is the table migration codes and created translation table foreign key is integer type, not UUID. class CreateMessageThreads < ActiveRecord::Migration …
Yoshi
  • 359
  • 3
  • 8
0
votes
1 answer

I18n adding "-US" to the en locale

I'm trying to persist the URLs with the specific language (i.e. en, pt, etc.) but after setting it up, I keep getting 'en-US' instead of 'en'. (i.e. localhost:3000/en-us/apps instead of localhost:3000/en/apps). Not sure where I can change this…
0
votes
1 answer

Globalize: How to show in the view the current locale information

I am currently having a bit of a problem with Globalize gem. I explain the current situation: I have a Model called Question. After creating it, without any data stored, I added the following lines to the model: class Question < ActiveRecord::Base …
Hashirama Senju
  • 185
  • 1
  • 10
0
votes
1 answer

Can't get f.globalize_fields_for to appear using globalize 4.0.2 ruby gem

I'm using rails 4.1.4 and ruby 2.1.2, globalize 4.0.2, batch_translations 0.1.3 (I couldn't get f.globalize_fields_for to work any other way than use this gem), i18n 0.6.11 and friendly_id 5.0.1. In posts/_form.html.erb, I have…
Pavan Katepalli
  • 2,142
  • 3
  • 26
  • 48
0
votes
0 answers

Thinking Sphinx - Globalize

I've set up Thinking Sphinx gem https://github.com/pat/thinking-sphinx and I'm trying to get it work with globalize https://github.com/globalize/globalize gem. I have a model named Content that has :name, :body ,:summary attributes and also…
Alexphys
  • 408
  • 4
  • 11
0
votes
1 answer

Error after bundle install

I am trying to install activeadmin-globalize My system: Rails 3.2.13 ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] Gem 1.8.23 Added this to Gemfile: gem "activeadmin-globalize", git:…
Edgars
  • 851
  • 1
  • 17
  • 50
0
votes
1 answer

Active admin input field with locale

I have built multi-language application.But at this point I see lot of trouble to edit my translations through ActiveAdmin interface. I want to be able add/edit translations through this interface. Because using seeds.rb is not an option for…
Edgars
  • 851
  • 1
  • 17
  • 50
0
votes
0 answers

Slow JSON generation time in Rails

I am currently trying to render a fairly large JSON, from a database model, with some translations using Globalize. It seems the problem is at the rendering process, not at loading the model and his translations. Completed 200 OK in 1141ms (Views:…
0
votes
1 answer

Simple_form and globalize gem

I am developing an application with Ruby on Rails (4.1) and I use the Globalize gem (version 4.0.1) to store various translations of my data. The problem is that when I use the "globalize_fields_for" method of simple_form in order to generate the…
manosagent
  • 345
  • 3
  • 15
0
votes
1 answer

Why I got stack level too deep error with Globalize, Unicorn and Rails?

When I replace this line in the Gemfile gem 'globalize3' By this one: gem 'globalize', '~> 3.0.0' As suggested here: https://github.com/globalize/globalize, I got this error while starting Unicorn From Unicorn log file I,…
0
votes
1 answer

Rails3 i18n globalize not handling locales

Running the Globalize v3.0.3 gem with rails3.2.13, attempting to edit all languages in the same form. (Note: editing each language by setting the locale individually is also registering a single value in the database). The generated error (with…
Jerome
  • 4,155
  • 1
  • 26
  • 47
-1
votes
1 answer

JQuery UI is not compatible with Globalize 1.x

I am having a problem using globalize.js 1.x with jQuery UI spinner. I would like to display appropriate currency symbol next to the number in spinner. But I am getting the error from following two…
cyrus-d
  • 409
  • 1
  • 7
  • 20
1 2 3
9
10