1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-18 04:20:50 +01:00

41 lines
657 B
PHP
Raw Normal View History

<?php
namespace App\LaravelGettext\Adapters;
use Illuminate\Support\Facades\App;
class LaravelAdapter implements AdapterInterface
{
/**
* Set current locale
*
* @param string $locale
* @return bool
*/
public function setLocale($locale)
{
App::setLocale(substr($locale, 0, 2));
return true;
}
/**
* Get the locale
*
* @return string
*/
public function getLocale()
{
return App::getLocale();
}
/**
* Get the application path
*
* @return string
*/
public function getApplicationPath()
{
return app_path();
}
}