We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c4cebb commit 6940aacCopy full SHA for 6940aac
src/core.js
@@ -65,6 +65,11 @@ register([
65
require('./locale-en-us')
66
]);
67
68
+// locales that are present in the window should be loaded
69
+if(window.PlotlyLocales && window.PlotlyLocales.length) {
70
+ register(window.PlotlyLocales);
71
+}
72
+
73
// plot icons
74
exports.Icons = require('./fonts/ploticon');
75
tasks/util/wrap_locale.js
@@ -6,8 +6,8 @@ var intoStream = require('into-stream');
6
7
var constants = require('./constants');
8
9
-var prefix = 'Plotly.register(';
10
-var suffix = ');';
+var prefix = 'var locale=';
+var suffix = ';if(typeof Plotly === \'undefined\') {window.PlotlyLocales = window.PlotlyLocales || []; window.PlotlyLocales.push(locale);} else {Plotly.register(locale);}';
11
12
var moduleMarker = 'module.exports = ';
13
0 commit comments