# Rails I18n

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/rails-i18n/17.md

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

---

## [Online translation services, to ease the pain](https://www.ruby-forum.com/t/online-translation-services-to-ease-the-pain/203957)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 8\
**Last updated:** [January 22, 2024, 6:59pm UTC](https://www.ruby-forum.com/t/online-translation-services-to-ease-the-pain/203957 "2024-01-22T18:59:57Z")

</div>

Hello, New member. I work at Mynewsdesk, a Swedish company with a Rails web-app translated into 5 languages. We’re feeling the pain of editing huge YAML-files (~4000 lines each in config/locales/\*yml), so I decided I…

---

## [Getting unexpected "end"](https://www.ruby-forum.com/t/getting-unexpected-end/260641)

<div class="topic-metadata">

**Author:** [@sonybotony](https://www.ruby-forum.com/u/sonybotony)\
**Replies:** 2\
**Last updated:** [December 18, 2020, 1:34am UTC](https://www.ruby-forum.com/t/getting-unexpected-end/260641 "2020-12-18T01:34:08Z")

</div>

Where am i putting the extra “end?” def abbreviate\_sentence(sent) words = sent.split(" “) new\_words = \[\] vowels = “aeiou” words.each do |word| if word.length \< 4 new\_words \<\< word end words.each do |word| word.…

---

## [Web interface for Manage translations](https://www.ruby-forum.com/t/web-interface-for-manage-translations/218293)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [September 12, 2013, 3:08pm UTC](https://www.ruby-forum.com/t/web-interface-for-manage-translations/218293 "2013-09-12T15:08:02Z")

</div>

Hi, this is a question that arises recurrently me How do you handle translations of your applications? I have seen that there are several companies that are dedicated to provide a paid service: … They look good. …

---

## [Using get text in gem and code](https://www.ruby-forum.com/t/using-get-text-in-gem-and-code/232589)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [October 16, 2014, 9:25pm UTC](https://www.ruby-forum.com/t/using-get-text-in-gem-and-code/232589 "2014-10-16T21:25:27Z")

</div>

I recently converted a large Rails 3 application into a gem. Localization is part of the original code base. I modified the gettext:find task to look in the gem and in any app that uses the gem to find potential tr…

---

## [Localize Slim templates in seconds for your Rails i18n](https://www.ruby-forum.com/t/localize-slim-templates-in-seconds-for-your-rails-i18n/231840)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [September 2, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/localize-slim-templates-in-seconds-for-your-rails-i18n/231840 "2014-09-02T15:49:16Z")

</div>

If you ever had to make existing (Slim) templates localizable for the internationalization of your Rails app, you know it is a real pain and takes ages! We have built a neat tool to extract all localizable strings fro…

---

## [\#localize for numbers](https://www.ruby-forum.com/t/localize-for-numbers/231227)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 0\
**Last updated:** [July 28, 2014, 9:00pm UTC](https://www.ruby-forum.com/t/localize-for-numbers/231227 "2014-07-28T21:00:40Z")

</div>

Hey guys, it’s been a while since I’ve been active on this list. :wink: There’s something that’s been bothering me for ages and I’m finally ready to do something about it: That something is the localization of number…

---

## [I18n-tasks to manage translations with static analysis](https://www.ruby-forum.com/t/i18n-tasks-to-manage-translations-with-static-analysis/240002)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [March 24, 2014, 12:26pm UTC](https://www.ruby-forum.com/t/i18n-tasks-to-manage-translations-with-static-analysis/240002 "2014-03-24T12:26:29Z")

</div>

i18n-tasks is a gem to find and manages missing and unused translations in your application. The default approach to locale data management with gems such as i18n is flawed. If you use a key that does not exist, this…

---

## [User name translation missing: pt-br.activemodel.errors.models](https://www.ruby-forum.com/t/user-name-translation-missing-pt-br-activemodel-errors-models/237706)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 1\
**Last updated:** [November 25, 2013, 11:15pm UTC](https://www.ruby-forum.com/t/user-name-translation-missing-pt-br-activemodel-errors-models/237706 "2013-11-25T23:15:05Z")

</div>

All of sudden I began to experience this error below. I doubled check all keys and they are fine. The second model “ShopAddress” is working fine, but I cannot find what is wrong with “ShopUser”. What else could it be? …

---

## [Rails to use i18n lazy look up with file structure](https://www.ruby-forum.com/t/rails-to-use-i18n-lazy-look-up-with-file-structure/237492)

<div class="topic-metadata">

**Author:** [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Replies:** 0\
**Last updated:** [November 15, 2013, 7:38pm UTC](https://www.ruby-forum.com/t/rails-to-use-i18n-lazy-look-up-with-file-structure/237492 "2013-11-15T19:38:01Z")

</div>

I am trying to handle i18n with file structure and rails doesn’t seem to find the look up with the lazy look up. and i posted my question in stackoverflow. I hope if there is someone who can answer my question than…

---

## [ISO-8859-16 not supported?](https://www.ruby-forum.com/t/iso-8859-16-not-supported/237387)

<div class="topic-metadata">

**Author:** [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Replies:** 3\
**Last updated:** [November 11, 2013, 5:54pm UTC](https://www.ruby-forum.com/t/iso-8859-16-not-supported/237387 "2013-11-11T17:54:21Z")

</div>

Hi, I understood ISO-8859-16 was among the supported encoding but I get this error: Encoding::ConverterNotFoundError: code converter not found for ISO-8859-16 org/jruby/RubyString.java:7597:in \`encode’ On this line…

---

## [Standalone Translation Application](https://www.ruby-forum.com/t/standalone-translation-application/206370)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [September 12, 2013, 3:18pm UTC](https://www.ruby-forum.com/t/standalone-translation-application/206370 "2013-09-12T15:18:34Z")

</div>

hi guys I’m searching for a standalone ruby application which allows our customer to manage the translations for different applications in one place. The idea is to use a I18N backend wrapper in the staging environem…

---

## [String.to\_datetime doesn't translate the monthname](https://www.ruby-forum.com/t/string-to-datetime-doesnt-translate-the-monthname/215432)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [September 12, 2013, 3:08pm UTC](https://www.ruby-forum.com/t/string-to-datetime-doesnt-translate-the-monthname/215432 "2013-09-12T15:08:03Z")

</div>

For example I have this translation file: And I’ve set: I18n.locale = :it This works fine: I18n.localize Time.now → “Mer 04 Gen 2012, 11:26:17 +0100” “02 Novembre 2012”.to\_datetime =\> Fri, 02 Nov 2012 00:00:00 +000…

---

## [Rails 3.x, Ruby 1.9.x + HAML = Terror?](https://www.ruby-forum.com/t/rails-3-x-ruby-1-9-x-haml-terror/218339)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 4\
**Last updated:** [August 9, 2013, 4:01pm UTC](https://www.ruby-forum.com/t/rails-3-x-ruby-1-9-x-haml-terror/218339 "2013-08-09T16:01:26Z")

</div>

Hi everyone, It seems ruby\_parser is required to parse HAML files for gettext msgids with the gettext:find rake task from gettext. However, ruby\_parser doesn’t seem to work on Ruby 1.9.x. So is it impossible to extr…

---

## [Get current language locale in view](https://www.ruby-forum.com/t/get-current-language-locale-in-view/235120)

<div class="topic-metadata">

**Author:** [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Replies:** 2\
**Last updated:** [June 1, 2013, 3:32pm UTC](https://www.ruby-forum.com/t/get-current-language-locale-in-view/235120 "2013-06-01T15:32:52Z")

</div>

Hi, I’m new in RoR and I need to write an if in a view to show a different video based in the current language. How can I get the current chosen locale? Thanks

---

## [\[HELP\] strange result in production mode on remote server cannot find why it happens \[rails 3.2.12\]](https://www.ruby-forum.com/t/help-strange-result-in-production-mode-on-remote-server-cannot-find-why-it-happens-rails-3-2-12/229893)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [February 12, 2013, 3:32pm UTC](https://www.ruby-forum.com/t/help-strange-result-in-production-mode-on-remote-server-cannot-find-why-it-happens-rails-3-2-12/229893 "2013-02-12T15:32:02Z")

</div>

I have a simple localization which is not working correctly for one language in ‘production’ mode … ( fine in dev, and fine in env production on localhost ) in the view ( haml) = I18n.t(:is\_written\_by, scope: ‘po…

---

## [Ruby gem to automate internationalizing your templates](https://www.ruby-forum.com/t/ruby-gem-to-automate-internationalizing-your-templates/225561)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [January 15, 2013, 12:07pm UTC](https://www.ruby-forum.com/t/ruby-gem-to-automate-internationalizing-your-templates/225561 "2013-01-15T12:07:32Z")

</div>

Hey, I wrote a gem called i15r (https://github.com/balinterdi/\*i15r\*). It automates replacing “plain” strings with I18n message strings in erb or haml templates which is a rather boring process when done manually. I’…

---

## [ActiveRecord accepts\_nested\_attributes\_for problem](https://www.ruby-forum.com/t/activerecord-accepts-nested-attributes-for-problem/225395)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [January 15, 2013, 11:50am UTC](https://www.ruby-forum.com/t/activerecord-accepts-nested-attributes-for-problem/225395 "2013-01-15T11:50:00Z")

</div>

I’m in this case: class Man \< ActiveRecord::Base has\_many :eyes accepts\_nested\_attributes\_for :eyes end class Eye \< ActiveRecord::Base belongs\_to :man validates\_inclusion\_of :color, in: { %w\[brown green blue\] } e…

---

## [My gem to insert i18n strings to templates](https://www.ruby-forum.com/t/my-gem-to-insert-i18n-strings-to-templates/225559)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [January 15, 2013, 11:50am UTC](https://www.ruby-forum.com/t/my-gem-to-insert-i18n-strings-to-templates/225559 "2013-01-15T11:50:00Z")

</div>

Hey, I’m the author of a gem called i15r (GitHub - balinterdi/i15r: Replaces plain text strings in your views and replaces them with I18n message strings so you only have to provide the translations (i15r = internation…

---

## [I18n.l date displays the month wrong by +one](https://www.ruby-forum.com/t/i18n-l-date-displays-the-month-wrong-by-one/225560)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [January 15, 2013, 11:50am UTC](https://www.ruby-forum.com/t/i18n-l-date-displays-the-month-wrong-by-one/225560 "2013-01-15T11:50:00Z")

</div>

I have an object with a created\_at date and if i just display (to\_date.to\_s) that in a template, it displays correctly as “2013-01-09” But, if i use i18n as in \<%= I18n.l object.created\_at.to\_date %\> it displays as 9…

---

## [Globalize with uppercase locale attribute](https://www.ruby-forum.com/t/globalize-with-uppercase-locale-attribute/224725)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 0\
**Last updated:** [November 23, 2012, 10:38am UTC](https://www.ruby-forum.com/t/globalize-with-uppercase-locale-attribute/224725 "2012-11-23T10:38:26Z")

</div>

Hi, I have this model: class Event translates :nome, :descrizione # other stuff end Inside the database I have defined the event\_translations table with locale field as enum(‘IT’, ‘EN’)… The problem is that G…

---

## [Timing of language setting](https://www.ruby-forum.com/t/timing-of-language-setting/223772)

<div class="topic-metadata">

**Author:** [@aris](https://www.ruby-forum.com/u/aris)\
**Replies:** 1\
**Last updated:** [October 17, 2012, 11:58am UTC](https://www.ruby-forum.com/t/timing-of-language-setting/223772 "2012-10-17T11:58:04Z")

</div>

Rails 3.1.3 Hi. My application’s i18n seems to work, but the timing of the language setting is wrong. I have an User model, which has a column, ‘language’, so that users can choose their default language. When each …

---

## [Gem for creating translation scopes in classes (i18n\_scopes)](https://www.ruby-forum.com/t/gem-for-creating-translation-scopes-in-classes-i18n-scopes/226375)

<div class="topic-metadata">

**Author:** [@menostos](https://www.ruby-forum.com/u/menostos)\
**Replies:** 0\
**Last updated:** [July 24, 2012, 1:15pm UTC](https://www.ruby-forum.com/t/gem-for-creating-translation-scopes-in-classes-i18n-scopes/226375 "2012-07-24T13:15:41Z")

</div>

Hi everybody I’ve created a gem called i18n\_scopes. it lets you specify helper methods with default scopes, so you don’t need to always supply the :scope option to your t method. it is also possible to have dynamic…

---

## [Translation in translationvariable](https://www.ruby-forum.com/t/translation-in-translationvariable/199689)

<div class="topic-metadata">

**Author:** [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Replies:** 5\
**Last updated:** [March 26, 2012, 2:41pm UTC](https://www.ruby-forum.com/t/translation-in-translationvariable/199689 "2012-03-26T14:41:51Z")

</div>

Hello, i need some help I want to use a translation variable in neu translation. something like this code: de: namespace: “Kunde” new: headline: “Kunden anlegen” submit: “t(namespace) anlegen” please help me :sm…

---

## [How can I translate form fields name in error messages?](https://www.ruby-forum.com/t/how-can-i-translate-form-fields-name-in-error-messages/201288)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 6\
**Last updated:** [March 26, 2012, 1:54pm UTC](https://www.ruby-forum.com/t/how-can-i-translate-form-fields-name-in-error-messages/201288 "2012-03-26T13:54:43Z")

</div>

I have a form with labels that I translate using the I18n format with YAML files. If the user does not fill in a field properly on the form an error message is displayed. I have managed to set up the YAML file to tra…

---

## [Loading an entire translation set from a database column](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 5\
**Last updated:** [March 13, 2012, 12:44pm UTC](https://www.ruby-forum.com/t/loading-an-entire-translation-set-from-a-database-column/209519 "2012-03-13T12:44:55Z")

</div>

Is it at all possible for me to load the monolithic YAML from a database column, as opposed to using a file load path? I’m working on a multi-site CMS and rather than have programmers tediously enter each translation…

---

## [Translating "to" and "from" in Finnish turned out to be hard…](https://www.ruby-forum.com/t/translating-to-and-from-in-finnish-turned-out-to-be-hard/212001)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 3\
**Last updated:** [March 13, 2012, 12:36pm UTC](https://www.ruby-forum.com/t/translating-to-and-from-in-finnish-turned-out-to-be-hard/212001 "2012-03-13T12:36:58Z")

</div>

Hi, I’m not even sure what the grammatical name for this is, but we ran into problems translating “to” and “from”, as in “to Eva” or “from Eva”. In Finnish, our translator tells us the correct translations are “Evall…

---

## [Long string , how to insert a new line?](https://www.ruby-forum.com/t/long-string-how-to-insert-a-new-line/200996)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 4\
**Last updated:** [November 25, 2011, 10:42am UTC](https://www.ruby-forum.com/t/long-string-how-to-insert-a-new-line/200996 "2011-11-25T10:42:00Z")

</div>

I have a very long string I want to split in 2 lines , I use \\r\\n and wrote : other\_web\_browsers\_warning: “You are welcome to continue using your current web browser,\\r\\n but you may experience display issues or oth…

---

## [Is there a way to add to an array from multiple files?](https://www.ruby-forum.com/t/is-there-a-way-to-add-to-an-array-from-multiple-files/213432)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 2\
**Last updated:** [November 2, 2011, 10:14am UTC](https://www.ruby-forum.com/t/is-there-a-way-to-add-to-an-array-from-multiple-files/213432 "2011-11-02T10:14:17Z")

</div>

say I have: locales/file1.yml en: foo: - bar locales/file2.yml en: foo: - baz I want to be able to call t(“foo”) and get \[“bar”, “baz”\]… Is there any way to do this? -patrick

---

## [Using ñ on rails 3](https://www.ruby-forum.com/t/using-n-on-rails-3/209036)

<div class="topic-metadata">

**Author:** [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Replies:** 1\
**Last updated:** [September 13, 2011, 11:10pm UTC](https://www.ruby-forum.com/t/using-n-on-rails-3/209036 "2011-09-13T23:10:04Z")

</div>

my es.yml looks like this es: attributes: user: password: “contraseña” but when loading on my browser I get invalid byte sequence in UTF-8 Extracted source (around line #12): 9: \<%= f.text\_field :email %\> 10…

---

## [Uploading a file](https://www.ruby-forum.com/t/uploading-a-file/226241)

<div class="topic-metadata">

**Author:** [@kapil\_k](https://www.ruby-forum.com/u/kapil_k)\
**Replies:** 1\
**Last updated:** [August 18, 2011, 8:38pm UTC](https://www.ruby-forum.com/t/uploading-a-file/226241 "2011-08-18T20:38:12Z")

</div>

how to upload a video,audio and a document file all in one controller? is it possible? if possible? please give me the solution

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/rails-i18n/17.md?page=1)
