<?php
class GermanButtonService extends ButtonService
{
public function getVoiceButton()
{
$this->addKeyboardMarkup("💬🇩🇪 تشخیص آلمانی ", SpeechToTextCallbackHandler::$key . ":" . "de");
$this->addKeyboardMarkup("💬🇮🇷 تشخیص فارسی ", SpeechToTextCallbackHandler::$key . ":" . "fa");
$markup = json_encode($this->getKeyboard(), true);
return $markup;
}
function addExamplesWebapp($word)
{
$this->keyboard['inline_keyboard'][] = [
[
'text' => "💡 مشاهده مثال $word",
'web_app' => ['url' => 'https://app.bayadic.com/dict/de/fa/example/'.$word]
]
];
}
function addConjugationsWebapp($word)
{
$this->keyboard['inline_keyboard'][] = [
[
'text' => "🖐 صرف فعل $word",
'web_app' => ['url' => 'https://app.bayadic.com/dict/de/fa/conjugate/'.$word]
]
];
}
function addWebAppPronounce($word)
{
if($this->getTG()->isPersianLanguage($word)){
$this->keyboard['inline_keyboard'][] = [
[
'text' => "📣 تلفظ کلمات",
'web_app' => ['url' => 'https://app.bayadic.com/dict/de/fa/'.$word]
]
];
}
else {
$this->keyboard['inline_keyboard'][] = [
[
'text' => "📣 تلفظ کلمه $word",
'web_app' => ['url' => 'https://app.bayadic.com/dict/de/fa/'.$word.'?pronounce']
]
];
}
}
function translateInWebApp($word)
{
$this->keyboard['inline_keyboard'][] = [
[
'text' => "🔍 مشاهده ترجمه $word",
'web_app' => ['url' => 'https://app.bayadic.com/dict/de/fa/'.$word]
]
];
}
function addTableSearchWordGame($word){
$this->keyboard['inline_keyboard'][] = [
[
'text' => "🧩 سرگرمی جدول",
'web_app' => ['url' => 'https://app.bayadic.com/games/wordsearch/'.$word]
]
];
}
function addWebAppItems($word)
{
$this->keyboard['inline_keyboard'][] = [
[
'text' => 'امکانات بیشتر',
'web_app' => ['url' => 'https://app.bayadic.com?v=1.0.1']
]
];
}
function addAddToLeitner($word)
{
$this->keyboard['inline_keyboard'][] = [
[
'text' => '📥 به جعبه لایتنر اضافه کن',
'web_app' => ['url' => 'https://app.bayadic.com/chat/add-to-leitner/de/fa/'.$word]
]
];
}
}