Skip to content

Commit

Permalink
Add de-CH locale.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Oct 21, 2015
1 parent 8532b27 commit 530dc10
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ This method is useful when formatting multiple numbers in the same units for eas
Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format) and [*locale*.formatPrefix](#locale_formatPrefix) methods. If *definition* is a string, it is the name of a built-in locale:

* `"ca-ES"` - [Catalan (Spain)](https://github.com/d3/d3-format/tree/master/src/locale/ca-ES.js)
* `"de-CH"` - [German (Switzerland)](https://github.com/d3/d3-format/tree/master/src/locale/de-CH.js)
* `"de-DE"` - [German (Germany)](https://github.com/d3/d3-format/tree/master/src/locale/de-DE.js)
* `"en-CA"` - [English (Canada)](https://github.com/d3/d3-format/tree/master/src/locale/en-CA.js)
* `"en-GB"` - [English (United Kingdom)](https://github.com/d3/d3-format/tree/master/src/locale/en-GB.js)
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import precisionPrefix from "./src/precisionPrefix";
import precisionRound from "./src/precisionRound";

import caEs from "./src/locale/ca-ES";
import deCh from "./src/locale/de-CH";
import deDe from "./src/locale/de-DE";
import enCa from "./src/locale/en-CA";
import enGb from "./src/locale/en-GB";
Expand All @@ -27,6 +28,7 @@ import zhCn from "./src/locale/zh-CN";

var localeDefinitions = {
"ca-ES": caEs,
"de-CH": deCh,
"de-DE": deDe,
"en-CA": enCa,
"en-GB": enGb,
Expand Down
6 changes: 6 additions & 0 deletions src/locale/de-CH.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
decimal: ",",
thousands: "'",
grouping: [3],
currency: ["", "\xa0CHF"]
};

0 comments on commit 530dc10

Please sign in to comment.