Skip to content

KentoNishi/iframe-translator

Repository files navigation

iframe-translator

Translate text for free in the browser with iframe shenanigans

Status: Normal

View on npm Publish Package Deploy Frontend

View on npm

Installation

npm i iframe-translator

Usage

General Usage

import { getClient, AvailableLanguages } from 'iframe-translator';

async function main() {
  const client = await getClient();
  console.log(AvailableLanguages); // { 'af': 'Afrikaans', ... }
  console.log(await client.translate('こんにちは')); // hello
  console.log(await client.translate('こんにちは', 'ko')); // 안녕하세요
  client.destroy();
}

Type Definitions

import type { AvailableLanguageCodes, IframeTranslatorClient } from 'iframe-translator';

About

Translate text for free in the browser with iframe shenanigans

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published