npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tacotranslate

v3.1.4

Published

Automatically translate your React application from and to any language with automatic, AI-powered i18n

Downloads

1,062

Readme

TacoTranslate

https://npmjs.com/package/tacotranslate https://github.com/tacotranslate/js-package

Take your React application to new markets automatically with AI-powered and contextually aware translations and i18n. Visit TacoTranslate.com for more information, and to create an account for free!

The only production dependenies are React and sanitize-html – a module that prevents against XSS attacks within your strings.

Install from npm

npm install tacotranslate

Usage

Check out our examples folder on GitHub to learn more.

import createTacoTranslateClient from 'tacotranslate';
import {TacoTranslate, Translate} from 'tacotranslate/react';

const tacoTranslateClient = createTacoTranslateClient({apiKey: '1234567890'});

function Page() {
	return <Translate string="Hello, world!" />;
}

const App = () => (
	<TacoTranslate client={tacoTranslateClient} locale="es">
		<Page />
	</TacoTranslate>
);

export default App;

Documentation

TacoTranslate automatically translates your React application to any of our currently 75 supported languages in minutes. It’s really easy to set up, and makes translation management a breeze. Say adiós to JSON-files, and learn to love a language request from your customers!

Visit https://tacotranslate.com/documentation to view the full documentation.

Known issues

If you’re using Jest, you might get an error stating ReferenceError: TextEncoder is not defined, or ReferenceError: TextDecoder is not defined. To fix this, do the following:

  1. Create or edit jest.setup.js:

    const {TextEncoder, TextDecoder} = require('node:util');
    
    global.TextEncoder = TextEncoder;
    global.TextDecoder = TextDecoder;
  2. Include the setup file in the setupFiles array within jest.config.js:

    module.exports = {
    	preset: 'ts-jest',
    	testEnvironment: 'jsdom',
    	setupFiles: ['./jest.setup.js'],
    };

Read more here.

Supported languages

TacoTranslate currently supports translation between the following 75 languages:

| Language | Locale code | | --------------------- | ----------- | | Afrikaans | af | | Albanian | sq | | Amharic | am | | Arabic | ar | | Armenian | hy | | Azerbaijani | az | | Bengali | bn | | Bosnian | bs | | Bulgarian | bg | | Catalan | ca | | Chinese (Simplified) | zh | | Chinese (Traditional) | zh-tw | | Croatian | hr | | Czech | cs | | Danish | da | | Dari | fa-af | | Dutch | nl | | English | en | | Estonian | et | | Farsi (Persian) | fa | | Filipino, Tagalog | tl | | Finnish | fi | | French | fr | | French (Canada) | fr-ca | | Georgian | ka | | German | de | | Greek | el | | Gujarati | gu | | Haitian Creole | ht | | Hausa | ha | | Hebrew | he | | Hindi | hi | | Hungarian | hu | | Icelandic | is | | Indonesian | id | | Irish | ga | | Italian | it | | Japanese | ja | | Kannada | kn | | Kazakh | kk | | Korean | ko | | Latvian | lv | | Lithuanian | lt | | Macedonian | mk | | Malay | ms | | Malayalam | ml | | Maltese | mt | | Marathi | mr | | Mongolian | mn | | Norwegian (Bokmål) | no | | Pashto | ps | | Polish | pl | | Portuguese (Brazil) | pt | | Portuguese (Portugal) | pt-pt | | Punjabi | pa | | Romanian | ro | | Russian | ru | | Serbian | sr | | Sinhala | si | | Slovak | sk | | Slovenian | sl | | Somali | so | | Spanish | es | | Spanish (Mexico) | es-mx | | Swahili | sw | | Swedish | sv | | Tamil | ta | | Telugu | te | | Thai | th | | Turkish | tr | | Ukrainian | uk | | Urdu | ur | | Uzbek | uz | | Vietnamese | vi | | Welsh | cy |