i18n and date_select exception
Reported by YavorIvanov | February 10th, 2009 @ 01:10 PM
When migrating a current project from GetText to i18n the following exception was thrown when using the date_select helper:
can't convert Symbol into String
Example:
When in your application you have set the I18n.locale to something different than "en" and you have the following simple code in your view:
<%= date_select("user_info", "birthdate") %>
You'll get the can't convert Symbol into String for the date_select helper. The problem can be rescued by giving the date_select helper order like this:
<%= date_select("user_info", "birthdate", :order => [:day,:month,:year]) %>
or by doing order in the yml file usually located at config/locales/your_lang.yml like this
date:
formats:
default: ""
long: ""
short: ""
order: [ :day, :month, :year ]
Comments and changes to this ticket
-
2048 cupcakes October 8th, 2024 @ 11:29 AM
A gentle, engaging game. we become what we behold reduces stress in studying and working. Invite you to join and experience. Just have passion.
-
JohnasonXian December 16th, 2024 @ 02:51 PM
Huge thanks to the author for the great article! I just played the Sprunki Phase game at https://sprunkiphase.com/, and it was an amazing experience. It's a perfect fit for both beginners and experienced music creators!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Internationalization API for Ruby.
This library is used in Ruby on Rails but also suited for use in other contexts.