Skip to content

translateLocale

Translations of the strings d3plus renders in its own UI (legend and timeline controls, zoom buttons, the table view, tooltip hints), keyed by locale code such as en-US or es-ES. Each entry maps the English string to its translation.

Every string a chart renders in its own interface (the back button, legend and zoom controls, the table view, tooltip hints) keyed by the English original. Setting a chart’s locale picks the matching dictionary; add your own entry to support another language.

import {translateLocale} from "@d3plus/locales";

translateLocale["es-ES"];

Parameters

import {translateLocale} from "@d3plus/locales";