2024.8.23
Loading...
Searching...
No Matches
ActionSwitchLang Class Reference

Public Member Functions

 __construct ($args)
 

Detailed Description

Class ActionSwitchLang

This class handles the action of switching the language configuration for the Bearsampp application.

Definition at line 15 of file class.action.switchLang.php.

Constructor & Destructor Documentation

◆ __construct()

ActionSwitchLang::__construct ( $args)

ActionSwitchLang constructor.

Parameters
array$argsAn array of arguments where the first element is expected to be the new language code.

Definition at line 22 of file class.action.switchLang.php.

23 {
24 global $bearsamppConfig;
25
26 // Check if the first argument is set and not empty, then replace the language configuration.
27 if (isset($args[0]) && !empty($args[0])) {
28 $bearsamppConfig->replace(Config::CFG_LANG, $args[0]);
29 }
30 }
const CFG_LANG
global $bearsamppConfig
Definition homepage.php:26

References $bearsamppConfig, and Config\CFG_LANG.


The documentation for this class was generated from the following file: