Questions tagged [i18n-gem]

Ruby internationalization and localization solution.

Ruby internationalization and localization solution.

For more information, see the official GitHub repository of the project.

105 questions
1
vote
1 answer

Order alphabetically country names in a select box using i18n in Rails

im writing a app using rails an i18n , i already have translated the countries in 6 lenguajes, and they all are in each own yml file with all other lenguaje stuff.. My question is how can i order , and reorder depending on the lenguage, (english,…
Moncho Chavez
  • 694
  • 2
  • 10
  • 31
1
vote
0 answers

Uninitialized constant i18n

I am trying internalization testing using rspec and hence using i18n gem. I see that I have the gem installed, but in my test I am looking for the default_locale. I did puts I18n.default_locale I am getting 'Uninitialized constant I18n' error. Has…
tech_human
  • 6,592
  • 16
  • 65
  • 107
1
vote
2 answers

Rails translations issue using i18n-js

I'm using github.com/fnando/i18n-js gem for JavaScript translation. I noticed when I view source the page and check the translations.js it loads the complete translations file, even if that page is using only one translation word. Any idea how…
kashif
  • 1,097
  • 4
  • 17
  • 32
1
vote
0 answers

I18n.locale doesn't inherits from I18n.default_locale defined in application.rb

I created a new rails 3.2.12 application and in application.rb i use to configure the default locale like this config.i18n.default_locale = "pt-PT" I had all the locales yml in the place and after running the server the translations doesn't…
tbem
  • 595
  • 4
  • 14
1
vote
1 answer

how to make i18n content searchable?

i want to make my multilingual site searchable which is fully static . The site shares 3 languages . I use a technique which captures unique tag content with its respective locale file ( it's in yml) like In my view files <%= t ".unique_key"…
1
vote
2 answers

UTF-8 vs. ASCII-8BIT Encoding Inconsistency in Ruby on Rails

I know there are many questions about rails and encoding out there, but I haven't been able to find anything about this specific question. I have a Ruby on Rails application using rails 3.1.3 and running under Jruby 1.6.7. We have support for both…
Krista
  • 895
  • 1
  • 6
  • 16
1
vote
1 answer

zend framework 2 some validators stays in the Zend\I18n\Validator package

I have observed that some validators (Alnum, Alpha, Float, Int and PostCode) are localized into "Zend\I18n\Validator" package instead of "Zend\Validator" how the zend documentation explains. Somebody knows because it's so. Can I use these validators…
josepmra
  • 617
  • 9
  • 25
1
vote
1 answer

Does Rails engines support i18n

What I am trying to do is have a translation file in my engine. I have placed files in config \locales \fr.yml Now I am writing translation for string hello fr: "Hello":"Bonjour" but I am getting translation error. When I use same line…
1
vote
1 answer

I18 Error in rails 2

I have use I18 gem . I want to translate in dutch so I do the following things In environment.rb file config.i18n.default_locale = "nl" In Application controller before_filter :set_locale def set_locale I18n.locale = params[:locale] ||…
urjit on rails
  • 1,763
  • 4
  • 19
  • 36
1
vote
2 answers

Configure I18n fallbacks on Heroku

I have tried everything to make the i18n Fallback on Heroku but I couldn't. I don't want to get the "translation missing messages". It work OK on developement mode. Please help! thanks require…
1
vote
1 answer

rails routes locale, gem 'route_translator' or gem 'i18n_routing' unable to translate match in resource

mainly i would use i18n_routing gem i will be happy if i will translate match 'vlk' under dashboard resource, trying everything around, and no success. Resources are translated successfully also new action...whats…
Jakub Kuchar
  • 1,665
  • 2
  • 23
  • 39
1
vote
1 answer

Rails i18n copycopter reaching out to infinity

I found copycopter a while ago and now started using it. I am pretty happy with it but now am having some weird issues. My DB size is 8M (thousands of versions on day one) and it keeps adding blubs. It started with a few hundres and over the weekend…
Yuri
  • 1,261
  • 1
  • 11
  • 23
1
vote
2 answers

How do I link the same page in another language with the i18n gem for Refinery CMS?

I'm converting a site into the Rails based Refinery CMS, I've setup the i18n refinery cms gem and I've created multi-lingual versions of my pages. I'd like to create a locale switcher on the page, so that a user can click on a flag and switch…
1
vote
1 answer

Trouble on translating views after renaming statements from 'translate' to 'I18n.t' and from 'localize' to 'I18n.l'

I am using Ruby on Rails 3.2.2 and I have a strange problem. In my view files I use the following code: # app/views/articles/show.html.erb I18n.t('.page_title') When I render the above view code in the browser I get the translation missing:…
Backo
  • 18,291
  • 27
  • 103
  • 170
1
vote
2 answers

What is the right translation tag to translate the Recaptcha error message

Currently I am developing an app. My user registration uses the recaptcha plugin. When the Captcha is wrong, the app gets the error: incorrect-captcha-sol How can I translate this message with I18n.t?
bulleric
  • 2,077
  • 6
  • 21
  • 36