mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-25 15:38:54 +00:00
Update src/core/I18n.js
Co-authored-by: Florian Bischof <design.falke@gmail.com>
This commit is contained in:
@ -23,7 +23,7 @@ export function setLocale(code) {
|
|||||||
locale = code;
|
locale = code;
|
||||||
}
|
}
|
||||||
// @function translate(string: String, data?: Object): String
|
// @function translate(string: String, data?: Object): String
|
||||||
// Actually try to translate the `string`, with optionnal variable passed in `data`.
|
// Actually try to translate the `string`, with optional variable passed in `data`.
|
||||||
export function translate(string, data = {}) {
|
export function translate(string, data = {}) {
|
||||||
if (locale && locales[locale] && locales[locale][string] !== undefined) {
|
if (locale && locales[locale] && locales[locale][string] !== undefined) {
|
||||||
string = locales[locale][string];
|
string = locales[locale][string];
|
||||||
|
Reference in New Issue
Block a user