2024.8.23
|
Public Member Functions | |
__construct () | |
getCurrent () | |
getList () | |
getValue ($key) | |
load () | |
Private Attributes | |
$current | |
$raw | |
Class LangProc
This class handles the language processing for the Bearsampp application. It loads language files, retrieves language settings, and provides language-specific values.
Definition at line 16 of file class.langproc.php.
LangProc::__construct | ( | ) |
LangProc constructor.
Initializes the LangProc object and loads the language settings.
Definition at line 33 of file class.langproc.php.
References load().
LangProc::getCurrent | ( | ) |
Gets the current language being used.
Definition at line 62 of file class.langproc.php.
References $current.
LangProc::getList | ( | ) |
Retrieves the list of available languages.
This method scans the language directory and returns a list of available language files.
Definition at line 74 of file class.langproc.php.
References $bearsamppCore, $result, and Util\endWith().
Referenced by load().
LangProc::getValue | ( | $key | ) |
Retrieves the value for a given language key.
This method returns the value associated with the specified key in the current language. If the key is not found, it logs an error and returns the key itself.
string | $key | The language key to retrieve the value for. |
Definition at line 103 of file class.langproc.php.
References $bearsamppRoot.
LangProc::load | ( | ) |
Loads the current language settings and data.
This method retrieves the default language from the configuration, checks if it is available, and then loads the corresponding language file.
Definition at line 44 of file class.langproc.php.
References $bearsamppConfig, $bearsamppCore, and getList().
Referenced by __construct().
|
private |
Definition at line 21 of file class.langproc.php.
Referenced by getCurrent().
|
private |
Definition at line 26 of file class.langproc.php.