search for: default_locale

Displaying 20 results from an estimated 24 matches for "default_locale".

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 application is in german: $ rails c Loading development environment (Rails 3.0.0.rc) >> I18n.default_locale => :de >> I18n.locale =&g...
2013 Mar 26
0
Pluralization with default_locale not working (Rails 4 Beta 1)
...n 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: config.i18n.default_locale = :de And in config/initializers/inflections.rb I put this: ActiveSupport::Inflector.inflections(:de) do |inflect| inflect.irregular ''region'', ''regionen'' end But its not working... When I change the inflection to inflect.irregular ''region''...
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 ? --
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 forcing a page.reload. The result was that the it kept the same locale in the url after the reloa...
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
2014 Jun 11
0
my webpage does not send emails confimation/notification
...C. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] # Enable escaping HTML in JSON. config.active_suppor...
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;
2011 Sep 05
1
I18n.locale Setting invalid
...UAGE''] 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 config/application.rb: config.i18n.default_locale = :zh It can work, but not by ''HTTP_ACCEPT_LANGUAGE''.. I did the right thing? -- ------------------------------------------------------------------------- learn log: http://me.boolsir.com my life log: http://www.boolsir.com --------------------------------------...
2010 Feb 23
1
how a js script can get the current locale from my rails app ?
...assing a global var .. // Create a JSON Object var myJSON = { "lang": "fr" }; // Pass it to the script immediately... datePickerController.setGlobalVars(myJSON); and it runs ... but I would like this script to use the language selected by the rails app user : the I18n.default_locale being modified in the rails app any clue ? thanks a lot .. erwin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsub...
2009 May 12
2
rails 2.3.2 is not generating environment.rb properly
...ames. config.time_zone = ''UTC'' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join(''my'', ''locales'', ''*.{rb,yml}'')] # config.i18n.default_locale = :de end ---------------------------------------------------------------------------------- -- Posted via http://www.ruby-forum.com/.
2011 Jun 01
4
missing these required gems: will_paginate
...ames. config.time_zone = ''UTC'' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join(''my'', ''locales'', ''*.{rb,yml}'')] # config.i18n.default_locale = :de end I google lot''s but d''t find sol. Please help me. thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public...
2017 Sep 14
1
Print All Warnings that Occurr in All Parallel Nodes
..."Time_OFF" = "c", "Delta_Time" = "c", "Comentario" = "c", "Es_Alarma" = "c", "Es_Ultima" = "c", "Comentarios" = "c"), locale = default_locale(), na = c("", " "), quoted_na = TRUE, quote = "\"", comment = "", trim_ws = TRUE, skip = 0, n_max = Inf, guess_max = min(1000, n_max), progress = FALSE)) } # C.2) parallel Package: Environment Se...
2008 Dec 14
0
Newbee met problems when do some i18n on rails
...chs/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 = :''zh-CN'' But, when I restart my server and try to access the rails project via browser. I''ve got one message "can''t convert Array into String", it comes from this <%=h distance_of_time_in_words(Time.now, item.expiredate, true) %> And it seems e...
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 /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in `load_missing_constant'' from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies...
2011 Jan 31
0
Rails 3 - Translation of Error header doen't work
...Base validates :firstname, :lastname, :presence=> true end [/code] Then I modified the ''application.rb'' file as follows: [code] config.i18n.load_path += Dir[Rails.root.join(''my'', ''locales'', ''*. {rb,yml}'').to_s] config.i18n.default_locale = :fr [/code] Then I tried to save a Client by leaving the mandatory fields empty and got: [code] "Impossible d''enregistrer ce %{model} : %{count} erreurs" [/code] as the header of the Errors dialog window. As you see, the interpolation was taken as it is instead of putting the M...
2012 Oct 10
0
Setting locale directories for I18n
...18n.load_path += Dir[Rails.root.join(''config'', ''locales'', ''**'', ''*.{rb,yml}'')] seems to work if the language setting is NOT dynamical. But I need to set initializers/i18n.rb in order to change the languages dynamically. I18n.default_locale = ''en'' LOCALES_DIRECTORY = ######HERE???? LANGUAGES = { ''English'' => ''en'', ''Français'' => ''fr'', ''日本語'' => ''ja'', ''Deutsch'' => ''...
2012 Sep 11
1
define_method vs module_eval
...ails    def initialize_details(details)    #{initialize.join("\n")}    end    METHOD end Here we invoke send() on the module Accessors, passing the :define_method symbol, which represents the define_method private method available from Class class. We create an instance method called default_locale, whose value is the block passed from register_detail class method of ActionView::LookupContext. Note that we later use "include Accessors" within LookupContext class to make that available as an instance method of LookupContext. We then create more instance methods using module_eval, wit...
2013 Jul 10
0
ActionView::Template::Error Not a directory vendor/assets/javascripts/ production
...sets.precompile += %w( search.js ) # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false # Enable threaded mode # config.threadsafe! # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true # Send deprecation notices to registered listeners config.active_support.deprecation = :notify # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) # config.active_record.a...
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
...lication 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 English name which sucks cause apparently when the user uses German it''d need to use find_by_name("Willkommen") but when the user uses English it''d need to use find_by_name("Welcome"). I don''t re...
2014 Apr 26
0
jquery_ujs.js 404
....js *.css *.png *.jpg *.jpeg *.gif] # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false # Enable threaded mode # config.threadsafe! # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true # Send deprecation notices to registered listeners config.active_support.deprecation = :notify # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) # config.active_record.a...