Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

handlebars-i18next-parser

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handlebars-i18next-parser

Parser/lexer for the combination of handlebars-i18next and i18next-parser

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

handlebars-i18next-parser

Parser/lexer for the combination of handlebars-i18next and i18next-parser.

If you are using handlebars-i18next to insert translation strings into your Handlebars templates, then this package will enable you to extract the keys (and default values) into JSON files for your translators.

Quickstart

Installation:

npm install --save-dev handlebars-i18next-parser
yarn add -D handlebars-i18next-parser

Configuration for i18next-parser (by default this assumes you use i18n as the name for the helper; see below on how to override):

import HbsI18nLexer from 'handlebars-i18next-parser';

{
    lexers: {
        hbs: [HbsI18nLexer],
        handlebars: [HbsI18nLexer],
    }
}

Finally, run i18next-parser as documented.

Using alternative helper/function names

handlebars-i18next lets you override the helper name. If you use this feature, for example to use the name t instead, you can notify the lexer by changing the i18next-parser lexers configuration as follows:

{
    lexers: {
        hbs: [{
            lexer: HbsI18nLexer,
            functions: ['t'],
        }],
    }
}

Made by

Digital Humanities Lab

FAQs

Package last updated on 29 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc