Questions tagged [rails-i18n]

Repository for collecting Locale data for Ruby on Rails I18n as well as other interesting, Rails related I18n stuff.

About

The Ruby I18n (shorthand for internationalization) gem which is shipped with Ruby on Rails (starting from Rails 2.2) provides an easy-to-use and extensible framework for translating your application to a single custom language other than English or for providing multi-language support in your application.

The process of "internationalization" usually means to abstract all strings and other locale specific bits (such as date or currency formats) out of your application. The process of "localization" means to provide translations and localized formats for these bits.

Links:

  1. Homepage
  2. Guide
778 questions
0
votes
1 answer

How to setup rspec tests to use default locale in Rails?

In my config.routes.rb file: scope '(:locale)' do resources :techniques, path: '/applications' do get '/complete_list' => 'techniques#complete_list' end end In my Gemfile: group :development, :test do gem 'rspec-rails' gem…
croceldon
  • 4,511
  • 11
  • 57
  • 92
0
votes
1 answer

Rails translations issue with i18n-js

I'm using http://github.com/fnando/i18n-js gem for JavaScript translation. Here is my translation yml: en: js: test: "%{name} created this board." In my JS, I run with "name" param is "$&". console.log(I18n.t('js.test',…
Snow Fox
  • 389
  • 6
  • 15
0
votes
1 answer

Rails i18n locale and regions

I have the following problem, I'm using the standard i18n to translate to spanish all the website (:es), but now I want to change model label that depends on regions and not only language. So I want to use es-MX,es-AR,es-PA and so on but in the…
Giancarlo Corzo
  • 1,976
  • 5
  • 24
  • 36
0
votes
1 answer

I18n in Rails module

I would like to use I18n in a Rails utility module which is in my lib directory. The utility method gets invoked in a mailer. The module is defined like module MyUtils def self.build_collection_full_email(collection) I18n.t('app_name') + " <"…
Will
  • 2,768
  • 1
  • 17
  • 15
0
votes
1 answer

LIT + Casein + authlogic

I'm trying to integrate LIT https://github.com/prograils/lit in a casein CMS install https://github.com/russellquinn/casein Casein uses authlogic for user authentication, to use the same sessions, casein can be configured to use the app's…
user14169
  • 183
  • 1
  • 8
0
votes
1 answer

I18n routes rails

I want to program in english but my output routes must be in another language. Today I'm using the following approach and I'm not getting the index action and new and edit still missing translation. I've tried to use test: one: other: without…
waldyr.ar
  • 14,424
  • 6
  • 33
  • 64
0
votes
1 answer

How do install paperclip gem on a ruby 1.8.7 system?

I've got an app written for ruby 1.8.7 / rails 2.3.15 and I am stuck with paperclip. When I try to install the gem I get: > ~$ gem install paperclip ERROR: Error installing paperclip: i18n requires Ruby version >= 1.9.3. When I install a 1.8.7…
plamenh
  • 131
  • 8
0
votes
0 answers

Modifying i18n locales and after Rails app initializes?

I'm trying to use I18n locales for a multisite application and wondering whether it's at all possible to load some extra translation locale files after the rails app has initialized? I'm already using the excellent Globalize gem for ActiveRecord…
toomanyredirects
  • 1,972
  • 15
  • 23
0
votes
1 answer

How to implement i18n in the Simple Form gem for a collection's "priority:" option

Integrating i18n with Simple Form gem Simple_form accommodates i18n well, and their docs are pretty thorough on i18n, but they don't specifically address the solution for the "priority:" option for a collection field. I've tried applying the…
Elvn
  • 3,021
  • 1
  • 14
  • 27
0
votes
0 answers

Rails I18n :many :other :count problems

I often have problems with translations. I remember this had to do with some translations using :many, but yet when I see an error message like this translation data {:one=>"1 month", :other=>"%{count} months"} can not be used with :count =>…
Cyril Duchon-Doris
  • 12,964
  • 9
  • 77
  • 164
0
votes
0 answers

Rails I18n Customize Interpolation symbols

I have an app running Rails and Angular, and am using I18n to translate all content. Unfortunately, I'm too far down the road to change the Angular interpolation symbols, which would have been very easy. There are instances when I would like to…
Eric H.
  • 6,894
  • 8
  • 43
  • 62
0
votes
1 answer

adding path_prefix in root_url

I have added localization in my website and it is working fine, except two points When I open website for example www.test.help.com it shows this url instead it should also show locale as I am using path_prefix in my application controller. When I…
0
votes
2 answers

i18n in Date::DAYS_INTO_WEEK?

Heelo, Basically what i want to do is I have a helper that that return the day name in week from an index, the base of fuction is the hash Date::DAYS_INTO_WEEK how can localize these names? i already use a svenfuch i18n in pt-BR but i can apply in…
Icaro
  • 107
  • 2
  • 14
0
votes
1 answer

Edit localization files from web

I'm developing backend for mobile apps on Rails. Features: server send json with specific locale when user select region and language from mobile app server have web interface for admins admins can change locale from web interface for specific…
mef_
  • 478
  • 1
  • 12
  • 31
0
votes
1 answer

How Do I Use the route_translator gem and not require the Locale?

I'm able to successfully use the route_translator gem when I require a locale. When I change between the two locales I have (en:fr) I have no problems clicking any of the links and displaying the correct views and link translations. Here is my…