শুরু করুন
ইনস্টলেশন
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 tacotranslateThis assumes you already have an application set up. See examples for more information.
বেসিক ব্যবহার
নীচের উদাহরণটি দেখায় কিভাবে একটি TacoTranslate ক্লায়েন্ট তৈরি করা যায়, আপনার অ্যাপ্লিকেশনকে TacoTranslate প্রদানকারীর সাথে মোড়ানো যায়, এবং অনুবাদিত স্ট্রিংগুলো প্রদর্শনের জন্য Translate কম্পোনেন্ট ব্যবহার করা যায়।
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>
);
}এই উদাহরণটি স্প্যানিশ (locale="es") ব্যবহার하도록 সেট করা হয়েছে, তাই Translate উপাদানটি আউটপুট করবে "¡Hola, mundo!".
উদাহরণ
আপনার ব্যবহারের ক্ষেত্রে বিশেষভাবে TacoTranslate কীভাবে সেটআপ করতে হয় তা জানতে আমাদের GitHub উদাহরণ ফোল্ডার দেখুন, যেমন Next.js App Router বা Create React App ব্যবহার করে।
আমাদের কাছে একটি CodeSandboxও সেট আপ করা আছে যা আপনি এখানে দেখে নিতে পারেন.