sonic-pi

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

C++

Code. Music. Live.

Locale.set_current

Sets the locales of the current thread order by the priority. 
Each thread has a current locales.
The system locale/default locale is used if the thread doesn't have current locales.

* tag: Locale::Language::Tag's class or the language tag as a String. nil if you need to
  clear current locales.
* charset: the charset (override the charset even if the locale name has charset) or nil.
* Returns: self

(e.g.)
   Locale.set_current("ja_JP.eucJP")
   Locale.set_current("ja-JP")
   Locale.set_current("en_AU", "en_US", ...)
   Locale.set_current(Locale::Tag::Simple.new("ja", "JP"), ...)

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-set_current-for-pr


# Commit to git

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


# 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-set_current-for-pr

hub pull-request


# Celebrate!