Displaying 20 results from an estimated 1200 matches similar to: "views w locale default template"
2010 Aug 21
2
Rails 3: I18n.locale not set to I18n.default_locale in production
I have an application that uses I18n, but in the first deployment, I
don''t want to enable different languages per user/request because
there are very few users who all speak german).
Therefore I have config.i18n.default_locale = :de in config/
application.rb.
I have no code whatsoever to set/change I18n.locale in my app.
In development environment, it works as expected: the
2010 Nov 03
3
|Newbie] Change default locale I18n file devise.
Hello!
This is probably something easy. I''ve looked at some documentation but
I didn''t find any good resources on how to change to default locale
file with Devise authentication plugin. Should I do it in my
application controller or should I change something in Devise? And how
should I do it.
Thanks
// Anders
--
You received this message because you are subscribed to the
2009 Jun 14
3
Rails I18n
Hi,
I am trying to use i18n in rails. I want the language to be set first
from params[:locale] (probably already in the url) then from the browser
http header and lastly from the default_locale. Everything is fine. Now
the problem starts, when I want to add a dropdown list to allow the user
to change the locale. How do I force the page to reload with the new
Locale? FYI, I tried using .js and
2011 Sep 05
1
I18n.locale Setting invalid
I like this set of
code:
before_filter :set_language
def set_language
request_language = request.env[''HTTP_ACCEPT_LANGUAGE'']
request_language = request_language.nil? ? nil :
request_language[/[^,;]+/]
I18n.locale = request_language if request_language &&
File.exist?("#{Rails.root.to_s}/config/locales/#{request_language}.yml")
end
if i setting
2011 Jun 01
4
missing these required gems: will_paginate
Hi EveryBody,
I hope some one help me.
I am new on ROR so might be problem is silly or Obvious. i had
developed a project and i had use "WILL_PAGINATE" plugin in my app.
It''s working well at localhost.
But when deploying on HEROKU, ALL step is going well but when running
$heroku rake db:migrate
ERROR IS
Missing these required gems:
will_paginate
You''re
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
I am using ''redmine'' (v 0.6) as my major project manager, seems running
fine w Rails 2.0 (slight modifs for paginations..) but I am stuck with a
major error when sending a confirmation email :
mailer.rb
class Mailer < ActionMailer::Base
....
# Renders a message with the corresponding layout
def render_message(method_name, body)
layout =
2010 Feb 23
1
how a js script can get the current locale from my rails app ?
I am not very fluent in JS, so I don''t see how to transfer the rails
app current locale ..
I have a JS script able to detect the default browser language ..
running fine
I can also modify the JS language, passing a global var ..
// Create a JSON Object
var myJSON = {
"lang": "fr"
};
// Pass it to the script immediately...
2009 May 12
2
rails 2.3.2 is not generating environment.rb properly
problem: rails 2.3.2 is not generating
config.action_controller.session_store = :active_record_store in
environment.rb
this is the code in environment.rb
---------------------------------------------------------------------------
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION =
2006 May 08
2
How to set the default language in GetText?
How to set the default language in GetText?
The default language of GetText is en,and I want to change it to another
language,and also keep the ability to change to any other languages by
just click the according href.
Currently I use:
class ApplicationController < ActionController::Base
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html;
2009 Dec 21
2
Multiple email recipients
I''m trying to call multiple email addresses from database. But dont
know how to get the logic into the recipients field.
#subscriptions_controller
def deliver
@subscription = Subscription.find(params[:id])
@users = @subscription.users
@subscription_recipients = @users.find(:all).collect { |user|
user.email }
@subscription.deliver
flash[:notice] = "Delivered
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
Hello,
I upgraded my application from Rails 2 to Rails 3 and ran into a
problem. In rails 2 I could use the english name of the record to find
it like:
Page.find_by_name("Welcome")
even though the user chose German as the language (which of course
showed the German welcome page.
Eversince I switched to Rails 3 (default_locale still :en) I can''t find
anything by giving the
2012 Feb 14
6
SMTP problem.
Hey all, well I am trying to send emails to newly created users but I
have a problem.
In the rails log it states that the email has been sent but the email is
never actually received so obviously there is a problem.
I have noticed one in particular and I don''t understand how to fix it.
Once I create the user I get the following error message:
Net::SMTPAuthenticationError (535-5.7.1
2011 Nov 22
7
rake aborted with ruby on rails
when i run * rake db:create*
*
*
WARNING: ''require ''rake/rdoctask'''' is deprecated. Please use ''require
''rdoc/task'' (in RDoc 2.4.2+)'' instead.
at
/home/vishnu/.rvm/gems/ruby-1.8.7-p352-D9TI4Ms3gBgeRYYz77F+sQ@public.gmane.org/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
DEPRECATION WARNING: Rake tasks in
2018 Nov 15
2
'date' format differences between CentOS 6 and 7 using the en_GB locale ?
Just noticed that the output of 'date' is different between CentOS 6 and
7 when using the 'en_GB' locale - e.g.:
CentOS 6:
% LANG=en_GB date
Thu Nov 15 11:42:46 GMT 2018
% LANG=en_US date
Thu Nov 15 11:42:56 GMT 2018
CentOS 7:
% LANG=en_GB date
Thu 15 Nov 11:43:07 GMT 2018
% LANG=en_US date
Thu Nov 15 11:43:11 GMT 2018
i.e. with LANG=en_GB on CentOS 7, the day
2009 Aug 06
20
Changing from database sqlite3 to mysql - windows
Hi Guys
I''d like to know how to change from using sqlite3 to mysql. I''m
running windows xp. What is the command that I must type under my
application folder? How to I log into the mysql database afterwards?
My database.yml file contents at the moment are:
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
2017 Sep 14
1
Print All Warnings that Occurr in All Parallel Nodes
Dear R Users,
I have developed the following code for importing a series of zipped CSV by parallel computing.
My problems are that:
A) Some ZIP Files (Which contain CSVs inside) are corrupted, and cannot be opened.
B) After executing parRapply I can only see the last.warning variable error, for knowing which CSV have failed in each node, but I cannot see all warnings, only 1 at a time.
So:
*
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
2003 Oct 17
2
AGI problem (crash) in RH9
If you're using perl on RedHat 9 make sure you put this command somewhere in
your boot scheme:
export LANG=C
or at least execute it before running perl scripts.
Redhat has EVERYTHING set to LANG=UTF-8 and it screws up all sorts of perl
stuff, and several other pre-written programs in other languages too
MATT---
-----Original Message-----
From: Ray Burkholder
2010 Oct 06
6
Error on running unity test: "no such file to load -- 'active_record/version'"
Hi folks!
I''ve been experimenting an error messagem when I try to run unity test
in any model of my project.
Here it is:
/home/fabricio/shopcell/config/environment.rb:1:in `require'': no such
file to load -- active_record/version (LoadError)
from /home/fabricio/shopcell/config/environment.rb:1
from ./test/test_helper.rb:2:in `require''
from ./test/test_helper.rb:2
2013 Mar 26
0
Pluralization with default_locale not working (Rails 4 Beta 1)
Hi,
I am just trying to setup an application in Rails 4, Beta 1. The
application is (exclusively) in German Language and therefore also the URLs
should be German. I want to create a controller and model for an entity
called "Region"; Rails pluralizes that to "Regions", but it should be
"Regionen". What I did is: in config/application.rb uncomment this line: