Do we use weglot in react native? [closed]

https://www.weglot.com/

Form the above link i can’t find any steps orinstruction to achive that.. so anyone know means please share

Weglot is a platform that offers website translation services. It allows website owners to easily translate their websites into multiple languages without having to manually translate each page. With Weglot, you can integrate translation seamlessly into your website and manage all your translations from one dashboard.

Integrating Weglot for Multi-Language Support in React Native

I have find some steps in gemini but its not working

While Weglot doesn’t have a dedicated React Native integration, you can achieve multi-language functionality using their JavaScript integration for Single Page Applications (SPAs). Here’s a detailed step-by-step guide:

  1. Weglot Setup:

a. Account and Project:

  • Head to Weglot: weglot.com and create an account.
  • Once logged in, create a new project and define the languages you want to support (e.g., English, French, Spanish).

b. Weglot JavaScript Integration:

  • In your Weglot project dashboard, navigate to the “Installation” section.
  • Choose the “JavaScript” integration option. Weglot will provide a code snippet that needs to be integrated into your React Native app.
  1. React Native App Integration:

a. Installation (Optional):

  • Consider using a library like react-native-async-storage to store the user’s preferred language locally. This can improve the user experience by remembering the chosen language across app launches.

b. Weglot Script Integration:

  • Open your app’s main entry point (usually App.js or index.js).
  • Paste the Weglot JavaScript code snippet you obtained in step 1.b within the componentDidMount lifecycle method of your main component. This ensures the script runs after the app loads.

Example Code (Replace YOUR_API_KEY with your actual key

import React, { useEffect } from 'react';
const App = () => {
  useEffect(() => {
    window.Weglot = {
      key: YOUR_API_KEY, // Replace with your Weglot API key
    };
    const script = document.createElement("script");
    script.setAttribute("src", 'https://cdn.weglot.com/weglot.min.js');
    document.body.appendChild(script);
     return () => {
      // Cleanup function (optional)
    };
  }, []);

  // ... rest of your app code
};
export default App;
  1. Handling Dynamic Content:

    Weglot might not automatically detect all translatable content in React Native apps due to their dynamic nature.
    To ensure proper translation, you need to mark dynamic content using the data-wg-id attribute.

Example:
<Text data-wg-id="welcome_message">Welcome to our app!</Text>

I need to achieve the weglot in react native