From f719e3441c5aebfb0d790a7ed25b3b3011a9938e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 12 Apr 2023 08:40:40 +0200 Subject: [PATCH] wip #5851 @1 --- src/Locale.php | 10 ++++++---- src/LocalizedList.php | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Locale.php b/src/Locale.php index 81ab891..0ef528c 100644 --- a/src/Locale.php +++ b/src/Locale.php @@ -2,10 +2,12 @@ namespace Cubist\Locale; -class Locale extends LocalizedList -{ - protected static function _getListPath() - { +class Locale extends LocalizedList { + protected static function _getListPath() { return 'vendor/umpirsky/locale-list/data/$locale/locales.php'; } + + public static function isLocale($code, $locale = 'en') { + return self::codeExists($code, $locale); + } } diff --git a/src/LocalizedList.php b/src/LocalizedList.php index 20dd1ca..525e1e0 100644 --- a/src/LocalizedList.php +++ b/src/LocalizedList.php @@ -1,13 +1,11 @@