1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 16:24:29 +00:00

Add Localization Helper

This commit is contained in:
Daniel Supernault 2019-02-27 20:14:53 -07:00
parent 0c654f5e43
commit 5cb5b5277d
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -0,0 +1,18 @@
<?php
namespace App\Util\Localization;
use Cache;
use Illuminate\Support\Arr;
class Localization {
public static function languages()
{
return Cache::remember('core:localization:languages', now()->addDays(14), function() {
$dir = resource_path('lang');
return Arr::flatten(array_diff(scandir($dir), array('..', '.', 'vendor')));
});
}
}