TacoTranslate
/
DocumentationPricing
 
  1. Introduction
  2. Getting started
  3. Setup and configuration
  4. Using TacoTranslate
  5. Server-side rendering
  6. Advanced usage
  7. Best practices
  8. Error handling and debugging
  9. Supported languages

Error handling and debugging

Debugging tips

When integrating and using TacoTranslate, you might encounter issues. Typically, these are very easy to resolve. Here are some useful tips to help debug:

Check console logs
TacoTranslate outputs debugging information when errors occur.

Inspect network requests
Filter requests by tacotranslate and inspect their output.

Using the error object

TacoTranslate provides an error object through the useTacoTranslate hook, which can help you handle and debug errors. This object contains information about any errors that occur during the translation process, allowing you to respond appropriately within your application.

import {useTacoTranslate, Translate} from 'tacotranslate/react';

function Page() {
  const {error} = useTacoTranslate();

  return (
    <div>
      {error ? <div>Error: {error.message}</div> : null}
      <Translate string="Hello, world!" />
    </div>
  );
}
Supported languages

A product from Nattskiftet