similar to: how to access to global i18n files in a plugin?

Displaying 20 results from an estimated 90000 matches similar to: "how to access to global i18n files in a plugin?"

2008 May 29
7
how to write spec for infinite loop?
Hi, I''ve got trouble when describe infinite loop. code snippet: def start_loop while true data = self.server.handle_client if data self.manager.dispatch(data) end end end without the loop, it is easy to test the logic. but how can I describe it to tell the developer ( me :-) ) that there should be an infinite loop inside. thanks. Regards, Peng
2012 Mar 31
2
I18n.t('countries.NO') broken?
Hi I''ve tried this on a virgin Rails 3.2.2 app. If you put the translations for country names in the locale file using the 2 letter ISO code, it looks something like this: en: countries: DE: "Germany" NO: "Norway" US: "USA" This works fine - but for Norway :-) I18n.t :''countries.DE'' # => "Germany" I18n.t
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 Mar 26
5
"invalid byte sequence in US-ASCII" on i18n form
I''m getting the error "invalid byte sequence in US-ASCII" when using i18n on Rails 3.0.0beta with Ruby 1.9.1. I''ve searched extensively on Google and the problem seems to happen with 2.3.x versions as well (when using Ruby 1.9.1). I just set the default language to portuguese and added this locale file:
2010 Aug 13
0
Plugin i18n rails for netbeans 6.9
hi friends, I developed a netbeans plugin to edit yml configuration files in a ruby on rails projects Just see my blog to more informations http://luiszandonadi.heroku.com/en/articles/netbeans/2010-07-11-i18n-rails-with-netbeans 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
2010 Apr 26
11
Rails I18n
I was just wondering about locales and .yml files. Is it better to store the multilanguage strings in .yml files than in databases? And if yes, why? I was also wondering how rails are loading this files (for example, I have 4 languages in my web app, each has her own .yml file, will my rails app loads all the files in ram and then it will call each variable inside my web app? Or something else?)
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 19
1
I18n::InvalidLocaleData error on load page
Hi All, I use rails 3.0.1 in my application and when the server web load this following page http://localhost:3000/signup <h1>Sign up</h1> <%= form_for(@user) do |f| %> <div class="field"> <%= f.label :name %><br /> <%= f.text_field :name %> </div> <div class="field"> <%= f.label :email %><br
2012 Sep 20
4
Duda sobre internacionalización (i18n)
Hola a todos, Tengo un programa que muestra unos informes generados con R (utilizando la función cat()), y me gustaría que dichos informes le aparecieran al usuario en el idioma que tenga definido según su LOCALE. ¿Cómo se podría hacer esto con R? En otros lenguajes lo que se hace es definir un diccionario con todas las palabras que aparecen en los informes, y su traducción en los distintos
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
2010 Oct 01
1
I18n.with_options bloc executed TWICE
Hi, to avoid putting the whole locale scope on every I18n.t call I''m trying to use a scope, as stated in the doc (http://guides.rubyonrails.org/active_support_core_extensions.html#with_options) I tried with <%= I18n.with_options :locale => :en, :scope => ''portal.visitor_menu'' do |i18n|%> Try <%= i18n.t :fav_songs %> <% end %> But it produce
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 03
1
Localizing attributes when using I18n
Currently I''m developing a multilingual app on rails 2.2. I liked very much the idea of Xavier Defrang to provide a locale-aware accessor for the fields that needs a translation: http://defrang.com/articles/2005/12/02/playing-with-rails-i18n I modified code a little to make it work with rails 2.2: def self.localize(*attribute_names) attribute_names.each do |attribute_name|
2009 Nov 09
0
Is there a way to get I18n.locale on a User model?
I''m trying to validate a User model using custom :message. I always get I18n.locale default value. Is there a way to get I18n current_locale? -- Posted via http://www.ruby-forum.com/.
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?
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
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 =
2012 Jan 31
3
Interesting strangeness with I18n.t
Hi all, I have a locale en.yml file like this: https://gist.github.com/1707858 If you launch a rails console and ask for: irb(main):003:0> I18n.t("country.ES") => "Spain" Cool. Expected response, but what if you do: irb(main):004:0> I18n.t("country.NO") => "translation missing: en.country.NO" Despite it exists (check it on the paste). I
2010 Nov 22
3
can't activate i18n (~> 0.4.1, runtime) for ["mail-2.2.10"
Hi Using RoR 3.0.3 on Mac OS X, and am running into the dependency problems. Please see the error below. I thought bundler was meant to precisely avoid these problems? thanks a lot for your help I tried bundle install / check , deleted old lockfile and regenerate it, but nothing worked. rails generate controller testcontroller index /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:233:in
2010 Sep 06
0
I18n interpolation problem
hi, i using rails 2.3.8, i have setting this on my view: <%=h l(@banner.expire, :format => :long) %> (when "@banner.expire" is a Date ) and this on the my localized yml locale: date: formats: long: "%d %B %Y" but wheel i load the page, i have this error: I18n::MissingInterpolationArgument in Admin/banners#show missing interpolation