mbostock/d3 — pull request #1652 by mbostock (2013-11-29 17:14:07+00:00)
Title: Quick and ugly hack to allow multiple locales.

[This is a work in progress!]

Fixes #750. This isn’t the final implementation, but more of a proof of concept demonstrating how to scope any code that requires localization within a closure that has access to locale-specific variables. In the next pass, I can go through this implementation and more cleanly separate locale-dependent from locale-independent code, and only put locale-dependent code within the closure.

Also, we may want to use an options object rather than passing a zillion arguments to d3.locale, because a many-argument method is hard to use and may make it harder to extend the API in the future. This commit also breaks the ability to change the default locale during the build process, but this should be easy to restore.