Socket
Socket
Sign inDemoInstall

@talend/locales-tui

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@talend/locales-tui

This module contains i18n files for TUI project.


Version published
Weekly downloads
97
decreased by-24.22%
Maintainers
1
Weekly downloads
 
Created
Source

TUI locales

This module contains i18n files for TUI project.

How to install

yarn add @talend/locales-tui 

or

npm install @talend/locales-tui

How to use with i18next

Synchronous use

i18n.js

import i18n from 'i18next';

import merge from 'lodash/merge';

import { namespaces as tuiNamespaces } from '@talend/locales-tui/namespaces';
import { locales as tuiLocales } from '@talend/locales-tui/locales';

i18n
	.init({
		ns: [
			...tuiNamespaces,
			...myProjectNamespaces
		],
		resources: merge(tuiLocales, 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/locales', to: 'assets/locales' },
		]),
	]
}

i18n.js

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

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

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

export default i18n;

FAQs

Package last updated on 27 Jul 2020

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