Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3488016
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:13:10+00:00 2026-05-18T11:13:10+00:00

My platform is: Windows7 x64, ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32], Rails 2.3.8 <%=

  • 0

My platform is:
Windows7 x64,
ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32],

Rails 2.3.8

<%= select_tag 'locale', options_for_select(LANGUAGES, I18n.locale),
    :onchange => 'this.form.submit()' %>

LANGUAGES looks like:

LANGUAGES = {
  'English' => 'en',
  "Espa\xc3\xb1ol" => 'es'
}

Despite the fact, that I18n.locale is equal to ‘en’, ‘English’ value is not selected.

<select id="locale" name="locale" onchange="this.form.submit()">
   <option value="es">Español</option>
   <option value="en">English</option>
</select>  

I’m totally stuck. I can’t figure out what’s the problem. Any ideas?

Update:
I have figured it out. I had to add to_s:

options_for_select(LANGUAGES, I18n.locale.to_s)

Thanks, Alpha.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:13:11+00:00Added an answer on May 18, 2026 at 11:13 am

    I had to add to_s:

    options_for_select(LANGUAGES, I18n.locale.to_s)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Platform: Windows 7, 64 bit (x64), Visual Studio 2008 I chose Python & Swig
I am running windows 7 x64 enterprise. I have Office 2010 x64 installed. I
Perhaps I'm missing a major point of the x64 platform here, but my perception
When running a PowerShell script on a x64-bit OS platform, how can you determine
IDE: Visual Studio 2010 .NET 4.0 x64 running on Windows 2008 R2 x64 All
Platform: Windows XP Development Platform: VB6 When trying to set an application title via
I'm just starting out on a cross-platform (Windows, Linux, OS X) C++ project, and
Using unmanaged C++ on a Windows platform, is there a simple way to detect
Does Visual C++ runtime imply Windows platform? I mean if I write a program
I have an ASP.Net 3.5 platform and windows 2003 server with all the updates.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.