Data dodania Pytanie
2017-02-26 13:02 Rails how to hide only default locale in url, but show others »
Is it possible to hide the default locale in the url, but show the locale in the other languages? Say, 'de' is my default locale, my login url should...
(0) odpowiedzi
2017-02-17 10:02 Check for hardcoded text in Rails views - I18n »
some of our devs (me included) don't always take it serious to put text in a localization file, result is a lot of hardcoded texts scattered around a ...
(2) odpowiedzi
2017-02-09 17:02 Apply defaults to namespaced ActiveRecord translations »
I have some models with a price attribute, which I want to translate. In my locales file, I have this translation: de: activerecord: attribute...
(1) odpowiedzi
2017-01-11 20:01 How to get a database entry with a specific language »
Using I18n for Ruby on Rails 4.0.0 I need a database entry for English, even though I'm currently in local => "de". The code is = link_to tag.name, :...
(1) odpowiedzi
2017-01-04 17:01 How to remove or edit the pluralization for comments and likes in rails »
I am new to rails, and i am working on a rtl website! I am trying to fix the pluralization in comment.count and get_upvotes.size to be replaced by the...
(1) odpowiedzi
2016-11-17 02:11 I18n clicking navbar link defaults back to English »
I'm following the railscast guide but for some reason, when I click on a link, the params locale is not being carried over. Here's my routes.db Rail...
(1) odpowiedzi
2016-09-14 23:09 Get current devise user in extended classes in rspec support file »
in my rails app I use devise for user authentication. I also use i18n for the whole website and each user has the possibility to choose her or his spe...
(0) odpowiedzi
2016-06-09 13:06 React-Rails: Use components with translations I18n »
I have added to my project react-rails gem and I want to use for translated components. I cannot put in the precompiled assets erb templates, but sti...
(1) odpowiedzi
2016-06-08 19:06 How to find translation in any level with Rails I18n? »
t some_translation_key finds only if some_translation_key is at first level, that is en.some_translation_key. I want a method that will find a transla...
(2) odpowiedzi
2016-04-23 13:04 List of available i18n translations for "helpers" in Ruby on Rails 4 and Simple Form? »
I can't seem to find a documentation to list what helpers are available for Rails' i18n. I first saw it in Simple Form's README The closest I find i...
(1) odpowiedzi
2016-03-16 16:03 Specs of my Rails app fail randomly because of wrong default locale »
From time to time, some specs of my Rails app seem to fail randomly because suddenly English is not the default language anymore, but German: expe...
(1) odpowiedzi
2016-03-10 22:03 Intercept and handle missing translations in helper »
I have a helper function that generates useful HTML markup. My functions are usually called with some parameters, including some text translated with ...
(3) odpowiedzi
2016-03-09 09:03 Locale fallbacks in Rails 4 not working »
I am building a Rails 4 site for a client in Singapore, Malaysia, Taiwan and China. The locale code for a Chinese speaking Malaysian is zh-MY. I wou...
(1) odpowiedzi
2016-03-08 18:03 Rails 4: ActiveRecord-style I18n on a non-ActiveRecord object? »
I have a Plain Old Ruby Class (PORO) that behaves a lot like an ActiveRecord model, although it is not persisted to the database. To make the interna...
(1) odpowiedzi
2016-02-03 15:02 I18n::InvalidLocaleData: can not load translations with sidekiq and jruby »
I have jruby-9.0.5.0 setup and i try to do some parallel processing using sidekiq. Everything works fine, except that if i use more than 12 sidekiq th...
(1) odpowiedzi
2015-12-30 21:12 I18n.t Translation Missing Default Value Nil »
So I know how return a default value if I get "translation missing:" when reading a yaml file. some = I18n.t("something.something_else", default: "va...
(2) odpowiedzi
2015-12-06 15:12 Rails: How is `translate` exposed to ActionController? »
Can anyone explain how I18n.translate is exposed to the ActionController class and can be used as plain translate or t? I would like to tweak the tra...
(1) odpowiedzi
2015-11-24 19:11 I18n Syntax Ruby on Rail error f.input_field »
I am trying to add I18n translations to replace HelloWorld with some translations in my RoR application: <%= f.input_field :misc_details, as: :tex...
(0) odpowiedzi
2015-11-15 07:11 Rails4 one codebase multiple domains each with default locale »
I have this setup with rails 4, i18n, git, heroku: myapp-hu-stage.herokuapp.com myapp-hu-live.herokuapp.com with the domain myapp.hu Currently thi...
(1) odpowiedzi
2015-11-12 16:11 Day name with I18n »
Without translation, this would get me today's day name: Date.today.strftime("%A") How would I localize it? I.e. "Mardi" if I18n.locale is set to...
(2) odpowiedzi
2015-11-12 10:11 How to integrate the language in the URL in Sinatra »
I have an application with many languages and now I want to integrate in the URL the language. Something like this: https://example.com/en/main/cars h...
(0) odpowiedzi
2015-11-05 14:11 Rails I18n: error 'translation missing' when i try translate this words "off" »
Why I can't translate this word? config/locales/pt-BR.yml pt-BR: testing: off: 'Desligado' offff: 'Test' rails console > I18n.t 'tes...
(1) odpowiedzi
2015-10-28 10:10 I18n in Rails for filter »
I have a problem I am unable to solve with internationalization in Rails. I am completely newbie in Rails. I have a collection of categories defined ...
(1) odpowiedzi