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

swig-i18n-abide

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swig-i18n-abide

Swig translation tags for i18n-abide

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Swig translation tags for i18n-abide

i18n-abide is a translation library for node.js apps.

Usage

Prerequisites

i18n-abide and swig need to be added as a middleware to the express (or other framework) app.

Also, format and gettext need to be supplied in the context of swig (using res.locals).

Template helpers

// setup the trans & blocktrans template helpers
require('swig-i18n-abide')(swig);

Templates

// single line translations
{% trans "I'll be translated" %}
// single line translations with replacements
{% trans "String %(foobar)s with string replacements" %}

// multiline translations with replacements and maybe html
{% blocktrans with name=name url=url %}
Hello <a href="%(url)s">%(name)s</a>.
Pleasure to meet you.
{% blocktrans %}

Keywords

FAQs

Package last updated on 16 Jun 2014

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