19.1.0 • Published 3 months ago

@talend/locales-tui-datagrid v19.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

TUI-datagrid locales

This module contains i18n files for TUI-datagrid project.

How to install

yarn add @talend/locales-tui-datagrid 

or

npm install @talend/locales-tui-datagrid

How to use with i18next

Synchronous use

i18n.js

import i18n from 'i18next';

import merge from 'lodash/merge';

import { namespaces as tuidatagridNamespaces } from '@talend/locales-tui-datagrid/namespaces';
import { locales as tuidatagridLocales } from '@talend/locales-tui-datagrid/locales';

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

i18n.js

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

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

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

export default i18n;
19.1.0

3 months ago

18.0.0

5 months ago

17.0.0

6 months ago

15.3.0

1 year ago

14.6.0

1 year ago

14.3.0

1 year ago

14.4.0

1 year ago

6.36.5

3 years ago

6.36.4

3 years ago

6.36.3

3 years ago