randydev commited on
Commit
a10a73e
·
verified ·
1 Parent(s): c62e7c4

Update chatbot/plugins/keyboards.py

Browse files
Files changed (1) hide show
  1. chatbot/plugins/keyboards.py +23 -6
chatbot/plugins/keyboards.py CHANGED
@@ -3,9 +3,26 @@ from chatbot.plugins.languages import LANGUAGES
3
 
4
  def get_language_keyboard():
5
  keyboard = []
6
- for lang_code, lang_name in LANGUAGES.items():
7
- keyboard.append(
8
- [InlineKeyboardButton(lang_name, callback_data=f"lang_{lang_code}")]
9
- )
10
- keyboard.append([InlineKeyboardButton("Cancel", callback_data="cancel")])
11
- return InlineKeyboardMarkup(keyboard)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  def get_language_keyboard():
5
  keyboard = []
6
+
7
+ # Row 1: English, Indonesian
8
+ keyboard.append([
9
+ InlineKeyboardButton("English", callback_data="lang_en"),
10
+ InlineKeyboardButton("Indonesian", callback_data="lang_id")
11
+ ])
12
+
13
+ # Row 2: Spanish
14
+ keyboard.append([
15
+ InlineKeyboardButton("Spanish", callback_data="lang_es")
16
+ ])
17
+
18
+ # Row 3: French, German, Japanese
19
+ keyboard.append([
20
+ InlineKeyboardButton("French", callback_data="lang_fr"),
21
+ InlineKeyboardButton("German", callback_data="lang_de"),
22
+ InlineKeyboardButton("Japanese", callback_data="lang_jp")
23
+ ])
24
+ keyboard.append([
25
+ InlineKeyboardButton("Cancel", callback_data="cancel")
26
+ ])
27
+
28
+ return InlineKeyboardMarkup(keyboard)