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

@transifex/i18next

Package Overview
Dependencies
Maintainers
0
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@transifex/i18next

i18next backend plugin for Transifex Native

  • 7.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-32.81%
Maintainers
0
Weekly downloads
 
Created
Source

Transifex Native is a full end-to-end, cloud-based localization stack for moderns apps.

Transifex Native SDK: i18next backend plugin

An i18next backend plugin, to load translations over-the-air using Transifex Native.

Related packages:

Learn more about Transifex Native in the Transifex Developer Hub.

Quick starting guide

Install the library using:

npm install @transifex/i18next --save

Webpack

import { TransifexI18next } from '@transifex/i18next';
const txBackend = new TransifexI18next({
  token: 'public token',
  // other options from @transifex/native init function
});

// add plugin to i18next
i18next.use(txBackend).init(...);

Node.js

const { TransifexI18next } = require('@transifex/i18next');
const txBackend = new TransifexI18next({
  token: 'public token',
  // other options from @transifex/native init function
});

// add plugin to i18next
i18next.use(txBackend).init(...);

Browser

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@transifex/i18next/dist/browser.i18next.min.js"></script>
<script type="text/javascript">
  const TransifexI18next = TxNativeI18next.TransifexI18next;
  const txBackend = new TransifexI18next({
    token: 'public token',
    // other options from @transifex/native init function
  });

  // add plugin to i18next
  i18next.use(txBackend).init(...);
</script>

Uploading phrases for translation

You can use @transifex/cli to push i18next JSON files for translation. First step is to install the CLI tool into the project using the command:

npm i @transifex/cli --save

Then, given that you have generated a source i18next JSON v4, use the following command to upload to Transifex for translation.

npx txjs-cli push source.json --parser=i18next

That's it. Given that the content is translated, translations will be downloaded over-the-air using the Transifex i18next backend.

Known limitations

CLI does NOT parse and push the following key types:

  • keyWithArrayValue
  • keyWithObjectValue

License

Licensed under Apache License 2.0, see LICENSE file.

Keywords

FAQs

Package last updated on 29 Aug 2024

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