UNPKG

marko-i18next

Version:

Components to use i18next in Marko templates.

9 lines (7 loc) 266 B
'use strict'; module.exports = function (el, codegen) { const builder = codegen.builder; const nameAttrValue = el.getAttributeValue('name'); const name = nameAttrValue ? nameAttrValue.value : null; return builder.var(name || 'i18n', 'out.stream.req.t'); };