diff --git a/src/pattern.js b/src/pattern.js
index 9337ccf31fd..540e82e7701 100644
--- a/src/pattern.js
+++ b/src/pattern.js
@@ -22,7 +22,9 @@ export default function Pattern(config = false) {
// Data containers
this.settings = {
mode: "draft",
- idPrefix: "fs-"
+ idPrefix: "fs-",
+ locale: "en",
+ units: "metric"
};
this.options = {};
this.store = new Store();
@@ -31,8 +33,7 @@ export default function Pattern(config = false) {
// Merge config with defaults
let defaults = {
measurements: {},
- options: {},
- units: "metric"
+ options: {}
};
this.config = { ...defaults, ...config };
for (let i in config.options) {
diff --git a/src/svg.js b/src/svg.js
index 36f8c61dc05..7462b0b0c1a 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -18,6 +18,7 @@ function Svg(pattern) {
this.attributes.add("xmlns", "http://www.w3.org/2000/svg");
this.attributes.add("xmlns:svg", "http://www.w3.org/2000/svg");
this.attributes.add("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ this.attributes.add("xml:lang", pattern.settings.locale);
this.attributes.add(
"xmlns:freesewing",
"http://freesewing.org/namespaces/freesewing"
diff --git a/tests/fixtures/render.js b/tests/fixtures/render.js
index 7db4f8960ed..4155c019e45 100644
--- a/tests/fixtures/render.js
+++ b/tests/fixtures/render.js
@@ -6,7 +6,36 @@ var render = {
+
+`,
+ boilerplateNl: `
+
+