sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Locale.init

Initialize Locale library. 
Usually, you don't need to call this directly, because
this is called when Locale's methods are called.

If you use this library with CGI or the kind of CGI.
You need to call Locale.init(:driver => :cgi).

==== For Framework designers/programers:
If your framework is for WWW, call this once like: Locale.init(:driver => :cgi).

==== To Application programers:
If your framework doesn't use ruby-locale and the application is for WWW,
call this once like: Locale.init(:driver => :cgi).

==== To Library authors:
Don't call this, even if your application is only for WWW.

* opts: Options as a Hash.
  * :driver - The driver. :cgi if you use Locale module with CGI,
    nil if you use system locale.
      (ex) Locale.init(:driver => :cgi)

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/locale-2.1.2/lib/locale.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Locale-init-for-pr


# Commit to git

git add app/server/ruby/vendor/locale-2.1.2/lib/locale.rbgit commit -m "better docs for Locale.init"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Locale-init-for-pr

hub pull-request


# Celebrate!