Socket
Socket
Sign inDemoInstall

grunt-concat-i18n

Package Overview
Dependencies
Maintainers
24
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-concat-i18n

A Grunt task for concatenating i18n files and generating a JavaSript friendly version of the result.


Version published
Weekly downloads
461
decreased by-12.02%
Maintainers
24
Weekly downloads
 
Created
Source

grunt-concat-18n

A Grunt task for concatenating i18n files and generating a JavaSript friendly version of the result.

Getting Started

This plugin requires Grunt >=1.5.3

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-concat-i18n --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-concat-i18n');

Usage

require('load-grunt-tasks')(grunt); // npm install --save-dev load-grunt-tasks

grunt.initConfig({
    'translations': {
         frontend: {
           dest: 'public/gen/js',
           languages: ['', 'de_DE', 'es_ES', 'fr_FR', 'nl_NL'],
           src: ['path/to/properties', 'other/path/to/properties'],
           scope: 'My.own.JS.scope',
           propertiesDest: 'public/gen/properties',
         }
    }
});

grunt.registerTask('default', ['translations']);

Required Options

dest

Type: String

The final destination for the JavaScript files

languages

Type: Array

The list of language codes.

src

Type Array

The list of properties bundle names without language codes and file endings

scope

Type String

The scope on which the generated JS files will be put. For use with for example localized-string enter module.exports

propertiesDest

Type: String

Default: Temporary directory`

Specified the output directory for the intermediate, concatenated, properties file

Keywords

FAQs

Package last updated on 03 Nov 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