Displaying 20 results from an estimated 4000 matches similar to: "Rails 3: I18n.locale not set to I18n.default_locale in production"
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
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
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
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...
2011 May 20
5
views w locale default template
[RAILS3]
I hesitate on how handling the locale view templates to default to
one language only ..
sending admin emails will go only to one locale ''en_GB''
should I set it up into the template name and set I18n.locale to
''en_GB''
membership_renew.en_GB.html.erb
OR
whatever locale is used , if I have :
membership_renew.html
it will be the default ?
--
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:
2012 Oct 10
0
Setting locale directories for I18n
Rails 3.1.3
I would like to apply i18n for my application.
Since there are many yml files in config/locales directory, I have made
subdirectories so that the maintenance will be easier. For example,
config/locales/devise/
date/
top/
...
Each subdirectories contain corresponding locale files that are applied
when users change
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 =
2004 Mar 30
1
Problems with charsets and i18n
Hello list,
probably a known issue (but I haven't found a link yet):
I'm using 3.0.2a with 'unix charset = ISO8859-15' and get the following then a file with ticks is created:
- desired: "???????`'??"
- displayed: "???????`'??"
^^^
The euro sign is created correctly in a file name. The filename will be displayed in the filesystem
2008 Dec 14
0
Newbee met problems when do some i18n on rails
1. I have download the zh-CN.yml file from http://github.com/svenfuchs/rails-i18n/tree/master/rails
locale
2. I have put this zh-CN.yml in to my locales folder.
3. I have modified the enviorment.rb like follow:
config.i18n.load_path << Dir[File.join(RAILS_ROOT, ''my'', ''locales'', ''*.
{rb,yml}'')]
config.i18n.default_locale =
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
2009 Jan 23
0
NameError: uninitialized constant I18n
Just installed the plugin as described on the link below.
http://factore.ca/on-the-floor/11-introducing-has-foreign-language-an-easy-database-internationalization-plugin
If i fire up my console and then:
I18n.default_locale = "en"
i got the error message:
NameError: uninitialized constant I18n
from
2014 Dec 21
1
Changing LANG from de_DE to en_US in CentOS 6
Hello,
on a Macbook with OSX Yosemite (which prints de_DE.UTF-8 as value of
$LANG in Terminal) and VmWare Fusion 7 I have installed CentOS 6.6
minimal.
When I ssh to my new VM as root, the $LANG is de_DE.UTF-8 too.
I would like it to be en_US.UTF-8 instead.
I have grepped /etc and /root for "de_DE", but nothing is found there.
Grepping for LANG in /etc gives many results, esp.
2009 Jun 24
3
I18N: allocator undefined for Proc
Hello all,
I''m trying to translate my application using the I18N feature and it was
working fine until I added a couple of new entries to the en.yml files.
Now in every action in my application I always get the following error:
TypeError in Account#login
Showing app/views/account/login.rhtml where line #2 raised:
allocator undefined for Proc
Extracted source (around line #2):
1:
2:
2006 Jan 05
7
Multilanguage problem, need help
hey,
i use http://mir.aculo.us/articles/2005/10/03/ruby-on-rails-i18n-revisited
then i have nl_BE.rb, de_DE.rb, en_US.rb as translation files.
this works all fine when i have normal characters, but i have one problem
when i have wierd characters like ? ? ? (mostly in french), then i get japanese
charachters on my site
i use utf8 for my database and i set this for each def in my controllers,
2014 Jun 11
0
my webpage does not send emails confimation/notification
Hello everybody
I have a problem with my inquireis, when I want to contact and I send the
message, I must receive two emails one of confirmation (client) and other
of notification (admin of the web page) but it does not send.
The webpage work in production environment.
When I watch the log (production.log) I seed this:
>
> There was an error delivering an inquiry confirmation:
> 503
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not
having i18n installed. Either bundler should be installing i18n along with
activesupport or docs need to be updated.
quick repro: https://github.com/softwaregravy/repro_active_support_i18n
bundle exec irb
require ''active_support/all''
detailed steps and error:
1) add to Gemfile
require
2011 Jul 22
2
ActiveSupport not including i18n?
Went to use ActiveSupport in a gem today and got an error on account of not
having i18n installed. Either bundler should be installing i18n along with
activesupport or docs need to be updated.
quick repro: https://github.com/softwaregravy/repro_active_support_i18n
bundle exec irb
require ''active_support/all''
detailed steps and error:
1) add to Gemfile
require
2009 Jan 17
2
active_scaffold + i18n
Hello all,
I have a project where I''m using active_scaffold and would also like to use
i18n over it.
While the i18n works fine if I just ignore the active_scaffold, I couldn''t
get it running with it.
I searched through its docs and googled quite a bit. Can I use i18n with
active_scaffold?
thanks
cheers
--
gallois
aka Felipe Gallois
blog: www.gallois.com.br/blog
fanglib
2010 Mar 19
2
I18n and Rails 2.3.5
Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I
call the *t* function, it works fine, but for some keys, it does not work
and I have no clue why it is going on.
I do have a .yml with correct keys and values. For example, in this (
http://dev.promine.com.br/promine) page, i18n is working properly, but in
this (http://dev.promine.com.br/servicos) one, it isn''t?