Apps get multi languages
This commit is contained in:
parent
f3986734fc
commit
c9f75cd3d7
@ -36,5 +36,4 @@ class ApiCompany
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class Modules
|
||||
public function compose(View $view)
|
||||
{
|
||||
if (setting('general.api_token')) {
|
||||
$categories = Cache::remember('modules.categories', Date::now()->addHour(6), function () {
|
||||
$categories = Cache::remember('modules.categories.' . language()->getShortCode(), Date::now()->addHour(6), function () {
|
||||
return collect($this->getCategories())->pluck('name', 'slug')
|
||||
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
|
||||
});
|
||||
|
@ -528,6 +528,7 @@ trait Modules
|
||||
'Accept' => 'application/json',
|
||||
'Referer' => env('APP_URL'),
|
||||
'Akaunting' => version('short'),
|
||||
'Language' => language()->getShortCode()
|
||||
];
|
||||
|
||||
$data['http_errors'] = false;
|
||||
|
@ -18,7 +18,8 @@ trait SiteApi
|
||||
'Authorization' => 'Bearer ' . setting('general.api_token'),
|
||||
'Accept' => 'application/json',
|
||||
'Referer' => env('APP_URL'),
|
||||
'Akaunting' => version('short')
|
||||
'Akaunting' => version('short'),
|
||||
'Language' => language()->getShortCode()
|
||||
);
|
||||
|
||||
$data['http_errors'] = false;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PaypalStandard\Events\Handlers;
|
||||
namespace Modules\PaypalStandard\Listeners;
|
||||
|
||||
use App\Events\PaymentGatewayListing;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user