Package com.fussuchalice.bot.controllers
Class LanguageSelectionController
java.lang.Object
com.fussuchalice.bot.controllers.LanguageSelectionController
The LanguageSelectionController class is responsible for managing language selection and messages in a Telegram bot.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesgetLanguageFileByCode(String code) Retrieves a language-specific properties file based on the specified language code.static PropertieshandleCallbackData(String data, long chatId) Handles callback data and returns the language-specific properties based on the selected language.static voidsendLanguageChangedMessage(DropboxUnofficialBot bot, long chatId, String messageText) Sends a message to the user to indicate a change in language or provide language-specific content.static voidsendLanguageSelectionMessage(DropboxUnofficialBot bot, long chatId, Properties languagePack) Sends a language selection message with inline keyboard buttons for language options. 
- 
Constructor Details
- 
LanguageSelectionController
public LanguageSelectionController() 
 - 
 - 
Method Details
- 
sendLanguageSelectionMessage
public static void sendLanguageSelectionMessage(DropboxUnofficialBot bot, long chatId, Properties languagePack) Sends a language selection message with inline keyboard buttons for language options.- Parameters:
 bot- The Telegram bot instance.chatId- The chat identifier where the message will be sent.languagePack- The language pack containing text messages.
 - 
sendLanguageChangedMessage
public static void sendLanguageChangedMessage(DropboxUnofficialBot bot, long chatId, String messageText) Sends a message to the user to indicate a change in language or provide language-specific content.- Parameters:
 bot- The Telegram bot instance.chatId- The chat identifier where the message will be sent.messageText- The text message to be sent.
 - 
getLanguageFileByCode
Retrieves a language-specific properties file based on the specified language code.- Parameters:
 code- The language code to determine the language-specific properties file.- Returns:
 - The loaded language-specific properties.
 
 - 
handleCallbackData
Handles callback data and returns the language-specific properties based on the selected language.- Parameters:
 data- The callback data representing the selected language.chatId- The chat identifier associated with the user.- Returns:
 - The language-specific properties for the selected language.
 
 
 -