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
3 answers

rails 3 multiple language for any user

I want my app has multiple languages. To do this, I read railscasts #138 But there, the writer put a language column to User model and thus users can see pages only in their language as I understand right. But I want my website can be seen in any…
kalahari
  • 895
  • 5
  • 15
  • 34
0
votes
1 answer

Rails i18n yaml file format issues

I'm trying to work out how to structure my en.yml file, and it doesn't seem to be working as expected. With a structure like this: en: activerecord: attributes: user: first_name: "First name" It works fine, referencing the…
Dave
  • 1,051
  • 1
  • 10
  • 20
0
votes
0 answers

rails active record male and female error messages

sorry for my english. There is a way to translate correctly male and female model names for spanish languages, for example: es: test: activerecord: errors: template: header: one: Ocurrió un error mientras se guardaba…
el_quick
  • 4,656
  • 11
  • 45
  • 53
0
votes
0 answers

Different javascript loading process between Production and Development environments

I've got an issue that must come from my side but turning me crazy :-p When I'm in development environment, I've to put these lines in application.html.erb to have I18n.js working : <%= javascript_include_tag "i18n" %> <%= javascript_include_tag…
Louis Borsu
  • 135
  • 1
  • 2
  • 10
0
votes
1 answer

Google Website translator translates only single page in Rails

I'm trying to have a multi language website in rails. So I added the google translate from here I added the meta script to my application.html.erb so that my whole site is translated. And the div to my index page only. But it just translates the…
0
votes
1 answer

Troubleshoot i18n YAML in Rails the Easy Way

I waste tons of time trying to construct the the proper yaml for translating text and labels in Rails. Is there an easy way to pinpoint what path I should use in the YAML to provide the translation? As an example, I am using a nested simple_form…
JHo
  • 1,068
  • 1
  • 14
  • 29
0
votes
1 answer

How a code can be assigned to an Application custom error messages

How a code can be given to an Application custom error messages in Ruby on Rails. when a user sees an error, he should be able to know both its error code and message. For example, I want to achieve the following result, in case of respective…
kashif
  • 1,097
  • 4
  • 17
  • 32
0
votes
1 answer

Not translated model parameter

Excerpt from my config/locales/models/de.yml: de: activerecord: attributes: guestbook: message: Nachricht The database exactly is the meaning of messages, but the message of the validation error instead of "Nachricht" written…
0
votes
1 answer

Rails Internationalization translate a word and append to a model field

My translation works great, but when I try to append a field of my model I get and error: This is the code: <%=t :beneficios @offer.benefits %> this is the error: app/views/offers/show.html.erb:18: syntax error, unexpected tIVAR, expecting…
Jean
  • 5,201
  • 11
  • 51
  • 87
0
votes
1 answer

Rails4 route with scope and namespace

quite new to Ruby and Rails, so it's probably a dumb question ;) I try to get a "i18n" route working with an "admin" namespace. So, my routes file looks like scope '/:locale' do root 'admin#index', as: :root namespace :admin do resources…
0
votes
1 answer

I18n and the snowman param conflict

I am using rails internationalization, so my URLs seem like this: http://localhost:3000/dashboard/index?locale=es I have a form with get method which appends the snowman param to the…
user1364684
  • 800
  • 2
  • 8
  • 28
0
votes
2 answers

Add translation to I18N dynamically

I have added humanized-money-accessors as described here: Decimals and commas when entering a number into a Ruby on Rails form Now I have two attributes in my model for the same type of data: the original version and the human-readable version. The…
Toni
  • 1,593
  • 1
  • 11
  • 21
0
votes
1 answer

Rails scope routing allows nil as a path segment?

I want to make my Rails3.2 app i18n according to the following site and to include a locale parameter in the URL path. (http://www.wordchuck.com/en/website/blogs/5) I implemented as scope ':locale' do resources :nodes end and other methods def…
linzhixing
  • 146
  • 2
  • 12
0
votes
2 answers

How to translate the name of the action in a form validation with activerecord?

I have a form, and the validation looks like the following: Create - Nom/titre de votre objet doit être rempli(e) - Catégorie doit être rempli(e) - Description doit être rempli(e) I would like to translate Create into something else. How can I…
Benjamin Crouzier
  • 40,265
  • 44
  • 171
  • 236
0
votes
1 answer

Rails I18n Pluralization Error

I wanted to set a custom error message for when an email was already taken so I edited the config/locales/en.yml file. It looked like this: en: activerecord: models: user: email: taken: "already being used" When I…
Amja
  • 1,315
  • 9
  • 25