# Rails I18n

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

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

**Page:** 6

---

## [Translating dynamic content](https://www.ruby-forum.com/t/translating-dynamic-content/185803)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 7\
**Last updated:** [March 26, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/translating-dynamic-content/185803 "2010-03-26T15:15:34Z")

</div>

Hi all. I have a custom validation which produces an error message with dynamic content, like so: errors.add\_to\_base(“Must have exactly #{self.size} questions for a #{self.size}-question sequenced quiz”) Can anyone …

---

## [I18n::backend::cache cache\_key collisions](https://www.ruby-forum.com/t/i18n-cache-cache-key-collisions/185760)

<div class="topic-metadata">

**Author:** [@mr.kamel](https://www.ruby-forum.com/u/mr.kamel)\
**Replies:** 0\
**Last updated:** [March 25, 2010, 6:43pm UTC](https://www.ruby-forum.com/t/i18n-cache-cache-key-collisions/185760 "2010-03-25T18:43:55Z")

</div>

Hi, i don’t find any useful information about my issue and i hope someone can help me out. please correct me if i’m wrong… i18n::backend::cache uses the cache\_key method to create a key for caching, right?! on line…

---

## [Globalize2 and Versioning](https://www.ruby-forum.com/t/globalize2-and-versioning/185067)

<div class="topic-metadata">

**Author:** [@dbkbali](https://www.ruby-forum.com/u/dbkbali)\
**Replies:** 0\
**Last updated:** [March 12, 2010, 9:03pm UTC](https://www.ruby-forum.com/t/globalize2-and-versioning/185067 "2010-03-12T21:03:04Z")

</div>

I have spent quiet a bit of time getting Globalize2 successfully working in our application. I am now trying to implement a versioning system for some of the activerecord models that have translations and was wonderin…

---

## [Inverse Translation](https://www.ruby-forum.com/t/inverse-translation/184622)

<div class="topic-metadata">

**Author:** [@Veet](https://www.ruby-forum.com/u/Veet)\
**Replies:** 9\
**Last updated:** [March 9, 2010, 6:56pm UTC](https://www.ruby-forum.com/t/inverse-translation/184622 "2010-03-09T18:56:45Z")

</div>

Is there a commonly accepted method for translating user input using I18n ? I would like users to be able to enter the names of books in an entry form in their own language. The list of books is large but finite (defi…

---

## [Translation key escape suggestion](https://www.ruby-forum.com/t/translation-key-escape-suggestion/184859)

<div class="topic-metadata">

**Author:** [@ginger72](https://www.ruby-forum.com/u/ginger72)\
**Replies:** 0\
**Last updated:** [March 9, 2010, 4:19pm UTC](https://www.ruby-forum.com/t/translation-key-escape-suggestion/184859 "2010-03-09T16:19:20Z")

</div>

Hi, while working on globalize\_bridge, a plugin that is supposed to provide a seamless migration path to I18n from Globalize1, I discovered what might be a useful feature in future versions of I18n. My app uses trans…

---

## [Globalize1 migration path, scopes and namespaces](https://www.ruby-forum.com/t/globalize1-migration-path-scopes-and-namespaces/184690)

<div class="topic-metadata">

**Author:** [@JSSS\_rgen\_FeSSSSlme](https://www.ruby-forum.com/u/JSSS_rgen_FeSSSSlme)\
**Replies:** 2\
**Last updated:** [March 6, 2010, 9:41pm UTC](https://www.ruby-forum.com/t/globalize1-migration-path-scopes-and-namespaces/184690 "2010-03-06T21:41:32Z")

</div>

Hi, I am working on this plugin I am calling globalize\_bridge. It is meant to provide a seamless migration path for rails apps using Globalize (1) and utilizing the built in rails I18n mechanism. I am pretty much don…

---

## [Installation workaround for i18n gem 0.3.5 on rails 2.3.4 not working](https://www.ruby-forum.com/t/installation-workaround-for-i18n-gem-0-3-5-on-rails-2-3-4-not-working/184655)

<div class="topic-metadata">

**Author:** [@ginger72](https://www.ruby-forum.com/u/ginger72)\
**Replies:** 3\
**Last updated:** [March 6, 2010, 12:57am UTC](https://www.ruby-forum.com/t/installation-workaround-for-i18n-gem-0-3-5-on-rails-2-3-4-not-working/184655 "2010-03-06T00:57:14Z")

</div>

I am using the installation description on where I have downloaded the gem into vendor/plugins/i18 and added the following lines, as suggested, to an intitializer (i18n.rb): def reload\_i18n! raise “Move to i18n ver…

---

## [I18n in Rails 3](https://www.ruby-forum.com/t/i18n-in-rails-3/184583)

<div class="topic-metadata">

**Author:** [@albert](https://www.ruby-forum.com/u/albert)\
**Replies:** 4\
**Last updated:** [March 6, 2010, 12:46am UTC](https://www.ruby-forum.com/t/i18n-in-rails-3/184583 "2010-03-06T00:46:42Z")

</div>

Hi, been doing some tiny app in Rails 3 to get the hang of it. From the official guide currently I don’t know how to do the routes trick: map.resources :books, :path\_prefix =\> ‘/:locale’ It’s probably me but I can’t…

---

## [Automatic localized routes using routing filter and user session](https://www.ruby-forum.com/t/automatic-localized-routes-using-routing-filter-and-user-session/184643)

<div class="topic-metadata">

**Author:** [@kristianm](https://www.ruby-forum.com/u/kristianm)\
**Replies:** 2\
**Last updated:** [March 5, 2010, 10:06pm UTC](https://www.ruby-forum.com/t/automatic-localized-routes-using-routing-filter-and-user-session/184643 "2010-03-05T22:06:21Z")

</div>

I would like to add localization to my rails apps in the prefix form, fx /:locale/my/other/path/segments As I understand it, you currently have to do sth like the following map.resources :books, :path\_prefix =\> ‘/:loc…

---

## [Simple backend and nested models](https://www.ruby-forum.com/t/simple-backend-and-nested-models/184592)

<div class="topic-metadata">

**Author:** [@cedric](https://www.ruby-forum.com/u/cedric)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 9:38am UTC](https://www.ruby-forum.com/t/simple-backend-and-nested-models/184592 "2010-03-05T09:38:06Z")

</div>

Hi, I’ve been looking around a fair bit on Google, but haven’t been able to answer my own question. I have a form that includes an association that uses nested\_attributes. When using the label method that uses someth…

---

## [Anyone using globalize2\_versioning?](https://www.ruby-forum.com/t/anyone-using-globalize2-versioning/184451)

<div class="topic-metadata">

**Author:** [@Kyle\_F](https://www.ruby-forum.com/u/Kyle_F)\
**Replies:** 4\
**Last updated:** [March 3, 2010, 12:40am UTC](https://www.ruby-forum.com/t/anyone-using-globalize2-versioning/184451 "2010-03-03T00:40:14Z")

</div>

Globalize2 looks awesome, but our app also requires versioning. I’m looking at globalize2\_versioning\[1\] but it looks fairly out of date, and I can’t seem to get it to load properly. (I’m using both as rails plugins)…

---

## [Interpolation-feature suggestion:](https://www.ruby-forum.com/t/interpolation-feature-suggestion/182705)

<div class="topic-metadata">

**Author:** [@grimen](https://www.ruby-forum.com/u/grimen)\
**Replies:** 10\
**Last updated:** [March 3, 2010, 12:09am UTC](https://www.ruby-forum.com/t/interpolation-feature-suggestion/182705 "2010-03-03T00:09:48Z")

</div>

Messaged to Sven directly, but maybe makes more sense to share: After using i18n for quite some time and extending i with own extensions/powers I found one features that is lacking that really should be useful feature…

---

## [Fallback and ActiveRecord backends together](https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729)

<div class="topic-metadata">

**Author:** [@pietro\_ferrari](https://www.ruby-forum.com/u/pietro_ferrari)\
**Replies:** 1\
**Last updated:** [February 27, 2010, 3:49pm UTC](https://www.ruby-forum.com/t/fallback-and-activerecord-backends-together/182729 "2010-02-27T15:49:20Z")

</div>

Hi all, I’m trying to use the Fallback and ActiveRecord backends together. I created a initializer that has: I18n.backend = I18n::Backend::ActiveRecord.new I18n::Backend::ActiveRecord.send(:include, I18n::Backend::Fa…

---

## [Rcov and i18n gem](https://www.ruby-forum.com/t/rcov-and-i18n-gem/183695)

<div class="topic-metadata">

**Author:** [@felipe](https://www.ruby-forum.com/u/felipe)\
**Replies:** 4\
**Last updated:** [February 25, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/rcov-and-i18n-gem/183695 "2010-02-25T21:39:18Z")

</div>

Hi guys, I installed rails 3 beta, and the gem i18n (active\_support dependency). After this, when I migrated my app to rails 2.3.5, it was 2.3.2, it became to raise an error when I ran rcov reports. The error is: /…

---

## [How can I get the I18n.default\_locale selected in my Rails app in a JS script?](https://www.ruby-forum.com/t/how-can-i-get-the-i18n-default-locale-selected-in-my-rails-app-in-a-js-script/184002)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 6\
**Last updated:** [February 24, 2010, 2:56pm UTC](https://www.ruby-forum.com/t/how-can-i-get-the-i18n-default-locale-selected-in-my-rails-app-in-a-js-script/184002 "2010-02-24T14:56:12Z")

</div>

I am not very fluent in JS, so I don’t see how to transfer the rails app current locale … I have a JS script able to detect the default browser language … running fine I can also modify the JS language, passing a glo…

---

## [Internationalize a Array of strings](https://www.ruby-forum.com/t/internationalize-a-array-of-strings/183939)

<div class="topic-metadata">

**Author:** [@andresgutgon](https://www.ruby-forum.com/u/andresgutgon)\
**Replies:** 5\
**Last updated:** [February 23, 2010, 8:25pm UTC](https://www.ruby-forum.com/t/internationalize-a-array-of-strings/183939 "2010-02-23T20:25:02Z")

</div>

Hi, i have a model User. Inside this model i have an Array: JOB\_CATEGORIES = \[‘Undergraduate student’, ‘Graduate student’ , ‘Pre-doctoral student’, ‘Postdoctoral student’,‘Asociate profesor’, ‘Assistant profesor’, ‘Re…

---

## [Very weird "error"](https://www.ruby-forum.com/t/very-weird-error/183760)

<div class="topic-metadata">

**Author:** [@taranaki](https://www.ruby-forum.com/u/taranaki)\
**Replies:** 2\
**Last updated:** [February 19, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/very-weird-error/183760 "2010-02-19T17:15:16Z")

</div>

Hello everyone I am working on a project and I am quite new to Rails, now I encountered something very strange in connection with the I18n. I use the following lines: \<%= submit\_tag t(:yes\_label), :name =\> ‘yes’ %\> \<…

---

## [Thinking sphinx && globalize2](https://www.ruby-forum.com/t/thinking-sphinx-globalize2/183504)

<div class="topic-metadata">

**Author:** [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Replies:** 3\
**Last updated:** [February 16, 2010, 10:29am UTC](https://www.ruby-forum.com/t/thinking-sphinx-globalize2/183504 "2010-02-16T10:29:13Z")

</div>

Hi all. Could you tell me plz - how to integrate sphinx search with globalize2? I’d like to perform search in models with translations. Thanks a lot.

---

## [Different Load Mechanism for I18n](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980)

<div class="topic-metadata">

**Author:** [@menostos](https://www.ruby-forum.com/u/menostos)\
**Replies:** 5\
**Last updated:** [February 12, 2010, 8:25am UTC](https://www.ruby-forum.com/t/different-load-mechanism-for-i18n/182980 "2010-02-12T08:25:50Z")

</div>

I’ve spent some time developing a plugin for i18n. What it actually does, is to extend the i18n to support different load mechanisms. First of all there is the simple everyone knows. Then i created a new Loader which…

---

## [Making parts of text clickable](https://www.ruby-forum.com/t/making-parts-of-text-clickable/183237)

<div class="topic-metadata">

**Author:** [@rasmus](https://www.ruby-forum.com/u/rasmus)\
**Replies:** 5\
**Last updated:** [February 11, 2010, 12:41pm UTC](https://www.ruby-forum.com/t/making-parts-of-text-clickable/183237 "2010-02-11T12:41:01Z")

</div>

Hi, I need to make specific parts of a translated text clickable. One way to do this is: Translations: rules: rules terms: terms do\_you\_accept: Do you accept the %{rules} and %{terms}? In view: t :do\_you\_accept, …

---

## [Globalize2 advice needed](https://www.ruby-forum.com/t/globalize2-advice-needed/183118)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 6\
**Last updated:** [February 10, 2010, 10:07am UTC](https://www.ruby-forum.com/t/globalize2-advice-needed/183118 "2010-02-10T10:07:18Z")

</div>

Hey all I’m doing my first i18n app in rails 2.3.4. I installed the globalize2 plugin and am now struggling to understand what’s going on - there’s not much documentation i can see for globalize2 besides the home pag…

---

## [Issue with mail notification](https://www.ruby-forum.com/t/issue-with-mail-notification/183036)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 4\
**Last updated:** [February 7, 2010, 9:07am UTC](https://www.ruby-forum.com/t/issue-with-mail-notification/183036 "2010-02-07T09:07:11Z")

</div>

Rails 2.3.5 / Ruby 1.8.7 Hi All I have a small issue when using mail notification my default locale is :en (but I have already 2 locales :en , :fr for testing purpose I have a Notifier model … class Notifier \< Ac…

---

## [Very simple Globalize1 view translation compatibility layer](https://www.ruby-forum.com/t/very-simple-globalize1-view-translation-compatibility-layer/182898)

<div class="topic-metadata">

**Author:** [@malesca](https://www.ruby-forum.com/u/malesca)\
**Replies:** 0\
**Last updated:** [February 4, 2010, 2:35pm UTC](https://www.ruby-forum.com/t/very-simple-globalize1-view-translation-compatibility-layer/182898 "2010-02-04T14:35:24Z")

</div>

Here: Globalize1 view translation compatibility layer for Rails i18n. · GitHub Makes String#t and String#/ work mostly like they do in Globalize1, without having Globalize1 installed. Useful if you’re moving to Rails …

---

## [Shouldn't I18n default to English?](https://www.ruby-forum.com/t/shouldnt-i18n-default-to-english/182825)

<div class="topic-metadata">

**Author:** [@mrpete](https://www.ruby-forum.com/u/mrpete)\
**Replies:** 9\
**Last updated:** [February 3, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/shouldnt-i18n-default-to-english/182825 "2010-02-03T14:20:47Z")

</div>

I’ve just started using I18n on a test application and everything is great except one thing: For the fun of it I set my Firefox user agent Accept-Language to Italian, and my page renders this: “it, hello\_world.” Shou…

---

## [Problem freezing svenfuchs-i18n gem](https://www.ruby-forum.com/t/problem-freezing-svenfuchs-i18n-gem/182760)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 4\
**Last updated:** [February 2, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/problem-freezing-svenfuchs-i18n-gem/182760 "2010-02-02T19:03:58Z")

</div>

Hi all, i’m having a problem with i18n gem. First, I froze rails into the vendor folder: that worked fine. For i18n, i installed a gem called svenfuchs-i18n: gem list | grep i18n =\>svenfuchs-i18n (0.2.0) I then froz…

---

## [Ruby-GetText picking random languages (up to 3 on the same page!)](https://www.ruby-forum.com/t/ruby-gettext-picking-random-languages-up-to-3-on-the-same-page/182757)

<div class="topic-metadata">

**Author:** [@psy-q](https://www.ruby-forum.com/u/psy-q)\
**Replies:** 4\
**Last updated:** [February 2, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/ruby-gettext-picking-random-languages-up-to-3-on-the-same-page/182757 "2010-02-02T14:21:44Z")

</div>

Hi everyone, We have recently upgraded our project from Rails 2.1.x to Rails 2.3.x, and in the process also had to upgrade our Ruby-GetText. Our config/environment.rb now refers to these GetText gems: config.gem “get…

---

## [I can't make i18n work on rails](https://www.ruby-forum.com/t/i-cant-make-i18n-work-on-rails/182065)

<div class="topic-metadata">

**Author:** [@wisemaster](https://www.ruby-forum.com/u/wisemaster)\
**Replies:** 5\
**Last updated:** [February 1, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/i-cant-make-i18n-work-on-rails/182065 "2010-02-01T16:38:58Z")

</div>

Hi, I’m following this guide Rails Internationalization (I18n) API — Ruby on Rails Guides but I can’t make it works. it says: “Rails adds all .rb and .yml files from the config/locales directory to your translations …

---

## [Advice for image folders in an i18n app](https://www.ruby-forum.com/t/advice-for-image-folders-in-an-i18n-app/182645)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 0\
**Last updated:** [January 31, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/advice-for-image-folders-in-an-i18n-app/182645 "2010-01-31T22:42:46Z")

</div>

Hey all. I’m starting my first i18n app and pondering how to organise my images and stylesheets. I can think of a couple of ways but thought that this problem has probably already been solved many times by people mu…

---

## [Gsub not working to replace a 'Chinese' Charater](https://www.ruby-forum.com/t/gsub-not-working-to-replace-a-chinese-charater/182473)

<div class="topic-metadata">

**Author:** [@dissolved](https://www.ruby-forum.com/u/dissolved)\
**Replies:** 3\
**Last updated:** [January 29, 2010, 5:03pm UTC](https://www.ruby-forum.com/t/gsub-not-working-to-replace-a-chinese-charater/182473 "2010-01-29T17:03:18Z")

</div>

gsub not works for me when replace ‘DBCS’(double byte character set) character, using last version ruby 1.8.6 when “stræ±‰å­—end”.gsub(/æ±‰å­—/,“hanzi”), output still is: stræ±‰å­—end , but not strhanziend which I wa…

---

## [Language issue in console](https://www.ruby-forum.com/t/language-issue-in-console/182444)

<div class="topic-metadata">

**Author:** [@toddf](https://www.ruby-forum.com/u/toddf)\
**Replies:** 2\
**Last updated:** [January 28, 2010, 7:43am UTC](https://www.ruby-forum.com/t/language-issue-in-console/182444 "2010-01-28T07:43:48Z")

</div>

Hi, We’re trying to search our database in Thai, but it seems the ruby console doesn’t recognise the characters. Can someone shead some light on this please? Some text input would be “à¸à¸£à¸¸à¸‡à¹€à¸—à¸žà¸¯” And t…

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

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