Socket
Socket
Sign inDemoInstall

@talend/locales-tui-stepper

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @talend/locales-tui-stepper

This module contains i18n files for tui-stepper project.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

tui-stepper locales

This module contains i18n files for tui-stepper project.

How to install

yarn add @talend/locales-tui-stepper 

or

npm install @talend/locales-tui-stepper

How to use with i18next

Synchronous use

i18n.js

import i18n from 'i18next';

import merge from 'lodash/merge';

import { namespaces as tuistepperNamespaces } from '@talend/locales-tui-stepper/namespaces';
import { locales as tuistepperLocales } from '@talend/locales-tui-stepper/locales';

i18n
	.init({
		ns: [
			...tuistepperNamespaces,
			...myProjectNamespaces
		],
		resources: merge(tuistepperLocales, myProjectLocales),
	});

export default i18n;

Asynchronous use

For async load, you need to copy the i18n files to the location you want to serve them

webpack.config.js

const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = {
	plugins: [
		new CopyWebpackPlugin([
			{ from: 'node_modules/@talend/locales-tui-stepper/locales', to: 'assets/locales' },
		]),
	]
}

i18n.js

import i18n from 'i18next';
import XHR from 'i18next-xhr-backend';

import { namespaces as tuistepperNamespaces } from '@talend/locales-tui-stepper/namespaces';

i18n
	.use(XHR)
	.init({
		ns: [
			...tuistepperNamespaces,
			...myProjectNamespaces
		],
		backend: {
			loadPath: '/assets/locales/{{lng}}/{{ns}}.json',
		},
	});

export default i18n;

FAQs

Last updated on 24 Oct 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc