TRF Certest first commit

This commit is contained in:
2025-02-26 08:57:46 +01:00
commit 3ce064a108
2524 changed files with 475404 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);
}
}