Commit 8349aa1
committed
Quick and ugly hack to allow multiple locales.
Fixes d3#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.1 parent 3234f47 commit 8349aa1
24 files changed
Lines changed: 1095 additions & 1082 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | 2 | | |
5 | 3 | | |
6 | | - | |
7 | | - | |
8 | 4 | | |
9 | 5 | | |
10 | 6 | | |
| |||
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 14 | | |
25 | 15 | | |
26 | 16 | | |
| |||
0 commit comments