diff --git a/eleventy.config.js b/eleventy.config.js index c9f221d..180fcc8 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,4 +1,10 @@ module.exports = function(eleventyConfig) { + // Locale-aware content: `t` resolves to the content bundle for the page's locale (fr by default) + eleventyConfig.addGlobalData("eleventyComputed", { + locale: (data) => data.locale || "fr", + t: (data) => data.i18n[data.locale || "fr"] + }); + // Copy assets folders to output eleventyConfig.addPassthroughCopy("src/assets");