Const DEFAULTS
DEFAULTS: object
allowHtml
allowHtml: false = false
attrInterpolateSelector
attrInterpolateSelector: string = "[data-attr-t-interpolate]"
attrInterpolateSuffix
attrInterpolateSuffix: string = "-t-interpolate"
attrSelector
attrSelector: string = "[data-attr-t]"
attrSuffix
attrSuffix: string = "-t"
baseDir
baseDir: string = process.cwd()
exclude
exclude: undefined[] = []
fileFormat
fileFormat: string = "json"
files
files: string = "**/*.html"
interpolateSelector
interpolateSelector: string = "[data-t-interpolate]"
locale
locale: string = "en"
localeFile
localeFile: "__lng__.json" = "__lng__.json"
locales
locales: string[] = ['en']
localesPath
localesPath: string = "locales"
outputDefault
outputDefault: "__file__" = "__file__"
outputDir
outputDir: null = null
outputOther
outputOther: "__lng__/__file__" = "__lng__/__file__"
outputOverride
outputOverride: {}
removeAttr
removeAttr: true = true
replace
replace: false = false
selector
selector: string = "[data-t]"
useAttr
useAttr: true = true
Library that takes care of the actual translation. It works by parsing DOM elements, extracting translation keys and injecting the translated text. Based on
claudetech/node-static-i18n
https://github.com/claudetech/node-static-i18n/