vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
84 stars 9 forks source link

Add format_locale and time_format_locale configuration options #134

Closed jonmmease closed 7 months ago

jonmmease commented 8 months ago

This PR updates the Rust, Python, and CLI interfaces to accept format_locale and time_format_locale options to set Vega's locale configuration.

Closes #133

In addition to accepting locale objects, the d3-format and d3-time-format locale files are bundled and it's possible to specify locales by name (e.g. it-IT).

There are also two new Python function: get_format_locale and get_time_format_locale. These return the named locale object as a Python dictionary. These are provided to allow other Python libraries, Vega-Altair in particular, to accept locales by name and look up their object value with vl-convert.