LaravelGettext::setLocale() not working properly. During executing this code in runtime, an error appeared.
Details:
Error: Using $this when not in object context in file C:\OpenServer\domains\bla-bla\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\LaravelGettext.php on line 68
` @return string
/
public function getLocale()
{
return $this->translator->getLocale();
}
/**
* Set current locale
*
* @param string $locale
* @return $this
* @throws Exceptions\LocaleNotSupportedException
* @throws \Exception
*/
public function setLocale($locale)
{
**if ($locale != $this->getLocale()) {**
$this->translator->setLocale($locale);
}
return $this;
}`
LaravelGettext::setLocale() not working properly. During executing this code in runtime, an error appeared. Details: Error: Using $this when not in object context in file C:\OpenServer\domains\bla-bla\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\LaravelGettext.php on line 68 ` @return string / public function getLocale() { return $this->translator->getLocale(); }
Please give me an answer. Laravel version 8.65