New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

laravel-mix-i18n

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-mix-i18n

Integrate Laravel Mix with vue-i18n (its official Webpack loader)

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Laravel Mix i18n

npm npm

Integrate Laravel Mix with vue-i18n and its official Webpack loader + extract localisable strings from all around your project code.

Getting started

yarn add -D laravel-mix-i18n
# or
npm i --dev laravel-mix-i18n

And add in your webpack.mix.js:

const mix = require('laravel-mix')
require('laravel-mix-i18n')

// Rest of your mix tasks here...

mix.i18n('resources/views', 'resources/lang', {
    loader: true,
    extractor: {
        extensions: '.blade.php'
    }
})

Check loader documentation here.

Advanced usage

Command line

You can also use this from your terminal just type:

./node_modules/.bin/i18n-extractor run es,en,fr,ch,jp

For more help just run it with --help or check the options below for more reference.

Options

Note: These are the options available for the extractor both in CLI, and webpack through extractor key except path and output.

NameTypeAvailableDefault
pathstringCLIresources/js
outputstringCLIresources/lang
extensionsstringCLI & Webpackts,tsx,js,jsx,vue,blade.php
matchRegExp | stringCLI & Webpack(t|trans|__)\\([\\\'"`]([a-zA-Z0-9: ]+)[\\\'"`]\\)
localesstringCLI & WebpackRequired
loaderbooleanWebpackfalse

License

This package is open-sourced software licensed under the MIT license.

Keywords

FAQs

Package last updated on 25 May 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