TacoTranslate
/
DukumiintiQiimaha
 
  1. Hordhac
  2. Bilowga
  3. Dejinta iyo qaabeynta
  4. Isticmaalka TacoTranslate
  5. Soo-saarida dhinaca server-ka
  6. Isticmaalka horumarsan
  7. Hab-dhaqannada ugu wanaagsan
  8. Maareynta khaladaadka iyo cilad-baarista
  9. Luqadaha la taageeray

Bilowga

Rakibid

To install TacoTranslate in your application, open your terminal and navigate to the root directory of your project. Then, run the following command to install with npm:

npm install tacotranslate

This assumes you already have an application set up. See examples for more information.

Isticmaalka aasaasiga ah

The below example demonstrates how to create a TacoTranslate client, wrap your application with the TacoTranslate provider, and use the Translate component to display translated strings.

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

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

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

export default function App() {
  return (
    <TacoTranslate client={tacoTranslateClient} locale="es">
      <Page />
    </TacoTranslate>
  );
}

The example is set to use Spanish (locale="es"), so the Translate component will output "¡Hola, mundo!".

Create an API key

Tusaalooyin

Head on over to our GitHub examples folder to learn more about how to set up TacoTranslate specifically for your use case, such as with the Next.js App Router, or using Create React App.

We also have a CodeSandbox set up that you can check out here.

Dejinta iyo qaabeynta

Alaab ka socota NattskiftetWaxaa laga sameeyay Norway