Package eu.hobbydev.bracheus.classes
Klasse LanguageHolder
java.lang.Object
eu.hobbydev.bracheus.classes.LanguageHolder
The `LanguageHolder` class is responsible for storing and providing language-specific keys
that are used in the Instagram interface. The keys are dynamic and depend on the user's selected
language, allowing the application to adjust to different languages for Instagram interactions.
The class uses annotations to bind the values of each key to XML properties, which are read during
the initialization process to configure the application. Each field corresponds to a specific
component of the Instagram UI (e.g., login fields, direct message labels, buttons, etc.) and is
localized based on the language settings.
This class is essential for enabling multi-language support in the application, making it easier
to interact with Instagram in various languages. It abstracts the language-specific elements,
so users can easily select and use their preferred language.
Example use case:
- The `LanguageHolder` can be used to retrieve language-specific labels like the "Send" button
text, "Username" field label, "Password" field label, etc., based on the current language configuration.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungRetrieves the text for the "Allow All Cookies" button in the selected language.Retrieves the label for the "Conversation With" aria element in the selected language.Retrieves the aria-label for direct messaging in the selected language.Retrieves the label for the "Login" field in the selected language.Retrieves the placeholder text for the message input field in the selected language.Retrieves the label for the "Password" field in the selected language.Retrieves the text for the profile section in the selected language.Retrieves the text for the search section in the selected language.Retrieves the label text for the "Send" button in the selected language.Retrieves the text for unread message indicator in the selected language.Retrieves the label for the "Username" field in the selected language.Retrieves the text for the "Wrong Password" message in the selected language.voidsetAllowAllCookiesButton(String allowAllCookiesButton) Sets the localized text for the "Allow All Cookies" button.voidsetConversationWithAria(String conversationWithAria) Sets the localized text for the "Conversation With" aria element.voidsetDirectMessagingAria(String directMessagingAria) Sets the localized aria-label for direct messaging.voidsetLoginField(String loginField) Sets the localized label for the "Login" field.voidsetMessagePlaceholder(String messagePlaceholder) Sets the localized placeholder text for the message input field.voidsetPasswordField(String passwordField) Sets the localized label for the "Password" field.voidsetProfileSpan(String profileSpan) Sets the localized text for the profile section.voidsetSearchSpan(String searchSpan) Sets the localized text for the search section.voidsetSendText(String sendText) Sets the localized text for the "Send" button.voidsetUnreadMessage(String unreadMessage) Sets the localized text for the unread message indicator.voidsetUsernameField(String usernameField) Sets the localized label for the "Username" field.voidsetWrongPassword(String wrongPassword) Sets the localized text for the "Wrong Password" message.
-
Konstruktordetails
-
LanguageHolder
public LanguageHolder()
-
-
Methodendetails
-
getSendText
Retrieves the label text for the "Send" button in the selected language.- Gibt zurück:
- the localized "Send" button text.
-
getMessagePlaceholder
Retrieves the placeholder text for the message input field in the selected language.- Gibt zurück:
- the localized message input field placeholder.
-
getConversationWithAria
Retrieves the label for the "Conversation With" aria element in the selected language.- Gibt zurück:
- the localized text for "Conversation With" aria element.
-
getAllowAllCookiesButton
Retrieves the text for the "Allow All Cookies" button in the selected language.- Gibt zurück:
- the localized "Allow All Cookies" button text.
-
getDirectMessagingAria
Retrieves the aria-label for direct messaging in the selected language.- Gibt zurück:
- the localized aria-label for direct messaging.
-
getUnreadMessage
Retrieves the text for unread message indicator in the selected language.- Gibt zurück:
- the localized unread message indicator text.
-
getWrongPassword
Retrieves the text for the "Wrong Password" message in the selected language.- Gibt zurück:
- the localized "Wrong Password" message.
-
getLoginField
Retrieves the label for the "Login" field in the selected language.- Gibt zurück:
- the localized "Login" field text.
-
getPasswordField
Retrieves the label for the "Password" field in the selected language.- Gibt zurück:
- the localized "Password" field text.
-
getProfileSpan
Retrieves the text for the profile section in the selected language.- Gibt zurück:
- the localized text for the profile section.
-
getSearchSpan
Retrieves the text for the search section in the selected language.- Gibt zurück:
- the localized text for the search section.
-
getUsernameField
Retrieves the label for the "Username" field in the selected language.- Gibt zurück:
- the localized "Username" field text.
-
setSendText
Sets the localized text for the "Send" button.- Parameter:
sendText- the localized text for the "Send" button.
-
setMessagePlaceholder
Sets the localized placeholder text for the message input field.- Parameter:
messagePlaceholder- the localized message input field placeholder.
-
setWrongPassword
Sets the localized text for the "Wrong Password" message.- Parameter:
wrongPassword- the localized "Wrong Password" message.
-
setConversationWithAria
Sets the localized text for the "Conversation With" aria element.- Parameter:
conversationWithAria- the localized text for the "Conversation With" aria element.
-
setUnreadMessage
Sets the localized text for the unread message indicator.- Parameter:
unreadMessage- the localized unread message indicator text.
-
setAllowAllCookiesButton
Sets the localized text for the "Allow All Cookies" button.- Parameter:
allowAllCookiesButton- the localized "Allow All Cookies" button text.
-
setDirectMessagingAria
Sets the localized aria-label for direct messaging.- Parameter:
directMessagingAria- the localized aria-label for direct messaging.
-
setLoginField
Sets the localized label for the "Login" field.- Parameter:
loginField- the localized "Login" field text.
-
setPasswordField
Sets the localized label for the "Password" field.- Parameter:
passwordField- the localized "Password" field text.
-
setProfileSpan
Sets the localized text for the profile section.- Parameter:
profileSpan- the localized text for the profile section.
-
setSearchSpan
Sets the localized text for the search section.- Parameter:
searchSpan- the localized text for the search section.
-
setUsernameField
Sets the localized label for the "Username" field.- Parameter:
usernameField- the localized "Username" field text.
-