diff --git a/libs/page_rendering/page_renderer.js b/libs/page_rendering/page_renderer.js index b4fb991b..711fbf55 100644 --- a/libs/page_rendering/page_renderer.js +++ b/libs/page_rendering/page_renderer.js @@ -131,12 +131,12 @@ page_renderer.prototype.render_file_by_template_path_extend_context = function ( } -page_renderer.prototype.render_file_by_template_path_replace_context = function (context_path, context) { +page_renderer.prototype.render_file_by_template_path_replace_context = function (context_path, context, culture) { const self = this context = context || {} const template_path = get_absolute_template_path_by_context_path(context_path) - const culture = enduro.config.cultures[0] + culture = culture || enduro.config.cultures[0] return self.render_file_by_context(template_path, context, culture) } diff --git a/libs/temper/temper.js b/libs/temper/temper.js index ef88e721..6d46bf09 100644 --- a/libs/temper/temper.js +++ b/libs/temper/temper.js @@ -12,7 +12,7 @@ const page_renderer = require(enduro.enduro_path + '/libs/page_rendering/page_re const abstractor = require(enduro.enduro_path + '/libs/abstractor/abstractor') // Goes through the pages and renders them -temper.prototype.render = function (filename, context) { +temper.prototype.render = function (filename, context, culture) { // use empty object if no context is provided context = context || {} @@ -21,7 +21,7 @@ temper.prototype.render = function (filename, context) { return abstractor.abstract_context(context) .then((context) => { - return page_renderer.render_file_by_template_path_replace_context(filename, context) + return page_renderer.render_file_by_template_path_replace_context(filename, context, culture) }) }