mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-02-22 02:42:18 +01:00
Merge pull request #367 from cachethq/dynamic-langs
Dynamic language list within setup.
This commit is contained in:
commit
86223f0522
@ -34,12 +34,13 @@ class SetupController extends Controller
|
||||
*/
|
||||
public function getIndex()
|
||||
{
|
||||
$langs = [
|
||||
'de' => 'Deutsch',
|
||||
'en' => 'English',
|
||||
'fr' => 'Français',
|
||||
'pt-BR' => 'Portuguese, Brazilian',
|
||||
];
|
||||
$langs = array_map(function ($lang) {
|
||||
$locale = basename($lang);
|
||||
|
||||
return [$locale => ucwords(locale_get_display_name($locale, $locale))];
|
||||
}, glob(app_path('lang').'/*'));
|
||||
|
||||
$langs = call_user_func_array('array_merge', $langs);
|
||||
|
||||
$regions = [
|
||||
'Africa' => DateTimeZone::AFRICA,
|
||||
|
Loading…
x
Reference in New Issue
Block a user