एकीकरण गाइड

Nuxt एप्लिकेशन का अनुवाद करें

1. एक खाता बनाएं

शुरू करने के लिए, कृपया नीचे दिए गए चरणों का पालन करें:

  • पर साइन अप करें app.globalseo.ai.
  • एक परियोजना बनाएं और उन भाषाओं का चयन करें जिनमें आप अपनी वेबसाइट का अनुवाद करना चाहते हैं।.
  • क्लिक करें: "सेव और इंटीग्रेट करें"
  • अब आपको एक पॉपअप दिखाई देगा जो आपको दो HTML कोड स्निपेट्स दिखाएगा। अपने वेबसाइट में कोड को एकीकृत करने के लिए नीचे दिए गए चरणों का पालन करें। .

अपने वेबसाइट में HTML स्क्रिप्ट कैसे जोड़ें:

Step 1: Open the Layout File for Custom Head Code

To add custom head code in Nuxt.js, you first need to open the layout file where you want to include the custom head configuration. This file is typically located in the layouts directory of your Nuxt project.

  1. Navigate to the layouts directory in your Nuxt project.
  2. Open the default.vue file (or any other layout file you wish to modify).

Your file structure should look something like this:

project-root/
├── layouts/
│   ├── default.vue
│   └── another-layout.vue

In the default.vue file, you can now add your custom head code.

Note:

When adding the following code to the default.vue file, make sure to adjust the placeholder values such as YOUR_API_KEY, YOUR_WEBSITES_ORIGINAL_LANGUAGE, and LANGUAGES_TO_TRANSLATE_TO to match your specific requirements:

<template>
  <div>
    <!-- Your existing template code -->
  </div>
</template>

<script>
export default {
  head() {
    return {
      link: [
        {
          rel: 'stylesheet',
          href: 'https://unpkg.com/weploy-translate/dist/weploy-translate.css'
        }
      ],
      script: [
        {
          src: 'https://unpkg.com/weploy-translate/dist/weploy-translate.js',
          'data-globalseo-key': 'YOUR_API_KEY',
          'data-use-browser-language': 'true',
          'data-original-language': 'YOUR_WEBSITES_ORIGINAL_LANGUAGE',
          'data-allowed-languages': 'LANGUAGES_TO_TRANSLATE_TO',
          'data-exclude-classes': ''
        }
      ]
    }
  }
}
</script>
Plus Icon
साथ में एकीकृत करें
नक्स्ट

निर्मित द्वारा

ओपन सोर्स

वेबसाइट

nuxt.com

श्रेणी

फ्रेमवर्क

AI वेबसाइट स्थानीयकरण के भविष्य में आपका स्वागत है

अपनी वेबसाइट के लिए अनुवाद शुरू करें, सिर्फ 5 मिनट में। साइन अप करें और 2,000 अनुवादित शब्द मुफ्त पाएं। .

शुरू करें