first commit

This commit is contained in:
2026-05-20 14:01:28 +02:00
commit 0beb9cbab0
2550 changed files with 558392 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Vanguard\Support;
class Locale
{
public const AVAILABLE_LOCALES = ['en', 'de', 'sr'];
public static function flagUrl(string $locale): ?string
{
return match ($locale) {
'en' => url('/flags/GB.png'),
'de' => url('/flags/DE.png'),
'sr' => url('/flags/RS.png'),
default => null,
};
}
public static function validateLocale(string $locale): bool
{
return in_array($locale, self::AVAILABLE_LOCALES);
}
}