# Posix locales in ruby?

**URL:** <https://rubytalk.org/t/posix-locales-in-ruby/66493>\
**Category:** ruby-talk\
**Created:** [14 October 2012 17:03 UTC](https://rubytalk.org/t/posix-locales-in-ruby/66493 "2012-10-14T17:03:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [14 October 2012 17:03 UTC](https://rubytalk.org/t/posix-locales-in-ruby/66493/1 "2012-10-14T17:03:53Z")

</div>

Hi,

any idea how localise ruby applications by locales settings on posix  
systems ? At least localized formating of numerics, date & time,  
currency and string collation ? Based on environment settings  
LC\_NUMERIC, LC\_TIME, LC\_MONETARY, LC\_COLLATE etc.

In Python there is locale  
library([http://docs.python.org/library/locale.html](http://docs.python.org/library/locale.html)) so I can simply call  
setlocale(LC\_ALL, "") and from now on most of library functions return  
localised values, strings are collated by current locale settings etc.

So are there some solutions for current Ruby 1.9.x ?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
