Displaying 3 results from an estimated 3 matches for "set_base_languag".
Did you mean:
set_base_language
2006 Apr 13
0
Globalize not with Rails 1.1.2
...../test_helper''
class NewsItemTest < Test::Unit::TestCase
# Uncomment the following line if the test/fixtures are used
# fixtures :globalize_countries, :globalize_languages,
:globalize_translations
def test_add_content_translations
NewsItem.delete_all
Globalize::Locale.set_base_language(''en-US'')
# create a row in the base language
Globalize::Locale.set(''en-US'')
assert_nothing_raised() do
assert_kind_of NewsItem, NewsItem.create!(:title => ''US Title'',
:excerp...
2006 Feb 17
4
Need Help with Globalize Plugin
...e examples in the wiki when using models but
it seems that my data is not being stored in the globalize_translations
table. Anyway here is a sample of my code.
environment.rb:
include Globalize
controllers/application.rb:
class ApplicationController < ActionController::Base
Locale.set_base_language(''en-US'')
end
models/sample.rb
class Trial < ActiveRecord::Base
translates :name
end
sample_controller.rb
class TrialController < ApplicationController
def index
Locale.set(''en-US'')
Trial.create(:name => ''One'...
2006 Jan 18
15
Anyone got Globalize working???
...e.diluvia.net/wiki
...and I''m very frustrated that no even the most simple stuff is working
as promised... I have created a model Product, added the translates()
declaration, and tried to create some translated products...
After the following lines, written into the console...
Locale.set_base_language(''en-US'')
Locale.set(''en-US'')
Product.create!(:name => ''Meatballs'')
...I get a new row in my products table with name=0 (zero)! This can''t
be valid, can it?
And after...
Locale.set(''es-ES'')
prod = Produc...