UNPKG

next-google-translate-widget

Version:

A simple Next.js/React component for integrating Google Translate Widget with customizable language options.

48 lines (37 loc) โ€ข 1.53 kB
# Google Translate Widget for NextJS/React A React/Next.js component to integrate Google Translate Widget easily. ## โœจ Features - โœ… Simple integration with React and Next.js - ๐ŸŒ Supports multiple languages - ๐Ÿ”„ Uses Google Translate's official widget - โšก Automatically loads translation script - ๐ŸŽจ Customizable included languages ## โš ๏ธ Limitations - ๐Ÿท Displays Google Translate branding - ๐Ÿ”ง Limited customization options due to Google Translate restrictions ## ๐Ÿ“ฆ Installation ```bash npm install next-google-translate-widget # or yarn add next-google-translate-widget ``` ## ๐Ÿš€ Usage/Examples ```tsx "use client"; import GoogleTranslate from "next-google-translate-widget"; export default function App() { return <GoogleTranslate pageLanguage="en" includedLanguages="hi,en" />; } ``` ## โš™๏ธ Props | Prop | Type | Default | Description | | ------------------- | -------- | --------- | ------------------------------------- | | `pageLanguage` | `string` | `"en"` | The main language of the page. | | `includedLanguages` | `string` | `"hi,en"` | Comma-separated languages to include. | ## ๐ŸŽฅ Demo [Live Demo](https://codesandbox.io/p/devbox/clhqy9) ## ๐Ÿค Contributing This package needs your contributions! Feel free to fork the repository and create a pull request. ๐Ÿš€ **Your contributions make this project better. Thank you for your support! โค๏ธ** ## ๐Ÿงพ License [MIT](https://choosealicense.com/licenses/mit/)