Getting locale information?

  • Thread starter Jeremy McAnally
  • Start date
M

Mat Schaffer

I'm working on a library, and it would be very nice to automatically
be able to switch out the data based on the user's locale. Is there a
way to automatically find that? Or is that something they will need
to setup?

Thanks,
Jeremy

If you're working in rails, it sounds like the globalize plugin might
be what you're looking for. It may have roots in libraries that you
could utilities in outside of rails as well, but I can't say for sure.
-Mat
 
J

Jeremy McAnally

I didn't think of that...I'm not working in Rails, but I'll grab
globalize and pick through it and see what I can find.

Thanks :)

--Jeremy

If you're working in rails, it sounds like the globalize plugin might
be what you're looking for. It may have roots in libraries that you
could utilities in outside of rails as well, but I can't say for sure.
-Mat


--
My free Ruby e-book:
http://www.humblelittlerubybook.com/book/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/
 
M

Masao Mutoh

Hi,

I'm working on a library, and it would be very nice to automatically
be able to switch out the data based on the user's locale. Is there a
way to automatically find that? Or is that something they will need
to setup?

Ruby-GetText-Package supports the system locale.

Try GetText.locale or Locale.get.
http://www.yotabanana.com/gettextapi/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top