# Form.radio\_button values

**URL:** <https://www.ruby-forum.com/t/form-radio-button-values/159134>\
**Category:** Rails\
**Created:** [February 1, 2009, 3:44am UTC](https://www.ruby-forum.com/t/form-radio-button-values/159134 "2009-02-01T03:44:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [February 1, 2009, 3:44am UTC](https://www.ruby-forum.com/t/form-radio-button-values/159134/1 "2009-02-01T03:44:58Z")

</div>

I’m using the radio\_button form tag in my project, and I just recently  
switched to using i18n. I would like all of my database entries to be in  
english so I can parse evertyhing quickly, yet the code below doesn’t  
quite work:

\<%= f.radio\_button(“part\_of\_speech”, ["#{t ‘noun’}",  
“Noun”]) %\>

Produces part\_of\_speech" “NounNoun”, If the user is using french it  
shows up as “NomNoun”. I Want the #{t ‘noun’} to show to the user, but  
only the ‘Noun’ to be sent to my controller, how can I do this? I would  
post into the I18n section, but its much less read, and this is less an  
issue with i18n, and more with how to make this work as expected:

f.radio\_button(“foo”, [“show me”,“send me”]

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [February 1, 2009, 5:09pm UTC](https://www.ruby-forum.com/t/form-radio-button-values/159134/2 "2009-02-01T17:09:55Z")

</div>

Hi Richard,

On Feb 1, 3:44 am, Richard S. \<rails-mailing-l…@andreas-  
[s.net](http://s.net)\> wrote:

> f.radio\_button(“foo”, [“show me”,“send me”]  
> So you want the translated string as a label? The radio button is only  
> a button, nothing  
> else. What you need is a label right next to the button:

f.radio\_button(“part\_of\_speech”, :noun  
f.label(“part\_of\_speech”, t(‘noun’))

ciao, tom

–  
Thomas R. “TomK32” Koll \<\> [http://ananasblau.com](http://ananasblau.com)  
just a geek trying to change the world  
[TomK32 (Thomas R. Koll) · GitHub](http://github.com/TomK32)
