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
3
votes
1 answer

What's the difference between Globalize.with_locale and I18n.with_locale?

I found both methods to work but I don't want strange surprises: what' the difference between them? Can I use one or another without problems?
Francesco Belladonna
  • 11,361
  • 12
  • 77
  • 147
3
votes
0 answers

Any way to temporarily disable I18n fallbacks / Globalize3 translations?

I'm trying to implement fallbacks for translated attributes using Globalize3 and I18n fallbacks. To get fallbacks up and running, I added to my environment.rb file: #support for locale fallbacks require "i18n/backend/fallbacks" …
jay
  • 12,066
  • 16
  • 64
  • 103
3
votes
1 answer

Globalize3-- Save translation to the database

Hey everyone I'm newbie and would love to get some help with saving locale translation to database. I have this form = form_for @restaurant do |f| = f.fields_for :en_info do |restaurant_en| %h4 English Information = restaurant_en.label…
Liban
  • 31
  • 1
3
votes
1 answer

Globalize3 - Error on migration when trying to add translations to an existing model

I'm trying to use Globalize3 as a simple way to provide translations to a model called EventCategory. Unfortunately, when I'm running the migration through rake db:migrate, I have the following error: == AddTranslationsToEventCategory: migrating…
3
votes
2 answers

globalize3 and easy_globalize3_accessors validation

I'm using gems: globalize3 and easy_globalize3_accessors. I have a problem with validations. For example, I have Post model: class Post translates :title, :content globalize_accessors :locales => [:en, :ru], :attributes => [:title, :content] …
2
votes
1 answer

i18n search using tire and Globalize3

i have a site that uses globalize3 gem (https://github.com/svenfuchs/globalize3) and i'm currently adding the Tire gem to make site search. How do i do to Index a table translations depending on the actual locale? right now the model that gets…
2
votes
1 answer

Relation "translations" does not exist after migrating to Rails 3.2.1

I migrated from Rails 3.1.3 to 3.2.1 and got the following error when loading the home page: PGError: ERROR: relation "translations" does not exist LINE 4: WHERE a.attrelid = '"translations"'::regclass …
peresleguine
  • 2,343
  • 2
  • 31
  • 34
2
votes
1 answer

nil class when changing the language from :de to :en but not the other way round

I use the globalize gem to translate content in my Rails App. Everything works fine when I change the language from the default language :en to :de but when I want to change the language from :de to :en I get a NoMethodError (undefined method…
Daniel Reiner
  • 137
  • 1
  • 2
  • 11
2
votes
3 answers

Get an array of many objects associations

I didn't know exactly how to find an understandable title so I'll try my best to explain my problem. I have 2 models: - Country translatable with globalize, with a name and many regions - Region belongs_to country What I would like to do is geting…
Ugo Mare
  • 442
  • 5
  • 15
2
votes
1 answer

I18n with friendly-id and globalize3 - avoid duplicate content (seo)

In a classic multilingual rails 4 website I want to avoid the duplicate content problem. I used friendly-id and globalize3 to make the website multilingual. Here is my configuration: classic page model: extend FriendlyId friendly_id :title, use:…
coding addicted
  • 3,422
  • 2
  • 36
  • 47
2
votes
1 answer

activeadmin-globalize does not update records

I am using rails4, activeadmin, globalize and activeadmin-globalize. I created a test application but it's not working properly for me. I have a model class model.rb class Post < ActiveRecord::Base active_admin_translates :title, :text do …
Martin Macak
  • 3,507
  • 2
  • 30
  • 54
2
votes
4 answers

gem globalize3 on rails 4

Someon are using globalize3 with rails4. How you configure it? i tryed to install, on my Gemfile: gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4' but i have these errors: Bundler could not find compatible versions for gem…
easteregg
  • 149
  • 9
2
votes
0 answers

Rails. Validations for many locales at the same time

I have a bilingual web site with two locales: en and ru. I want my site to have i18n. I use 'globalize3' and 'easy_globalize3_accessors' gems. There are departments I can create and edit with standard forms. Locales are given from URL:…
blackst0ne
  • 681
  • 6
  • 22
2
votes
1 answer

Use globalize3 (with_translation) with 2 models in a query (include)

Using Globalize3 I am trying to load the following models including translations in a single query: products (with product_translations) properties (with property_translations) When I try the query below it loads only the translations for product.…
benoitr
  • 6,025
  • 7
  • 42
  • 67
2
votes
1 answer

Loading specific translations with Globalize3

Is it possible to load a specific translation with Globalize 3? For instance, I have a Post which is translatable and shows on the front end in the correct locale as it should. However, I want to show a this same version in the admin which has a…
Neil Middleton
  • 22,105
  • 18
  • 80
  • 134