mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Utilities - Locale - setLocale() method - return result of setting new locale (instead of "true")
Tests - Locale - fix incorrectly prepared tests
This commit is contained in:
@@ -23,7 +23,7 @@ class Locale
|
||||
* setting. It's the same constant as required by setlocale() function.
|
||||
* @param string $languageCode Language code, in ISO 639-1 format. Short form of the locale, e.g. "fr".
|
||||
* @param string $countryCode (optional) Country code, in ISO 3166-1 alpha-2 format, e.g. "FR"
|
||||
* @return bool
|
||||
* @return false|string
|
||||
*
|
||||
* Available categories (values of $category argument):
|
||||
* - LC_ALL for all of the below
|
||||
@@ -57,9 +57,8 @@ class Locale
|
||||
}
|
||||
|
||||
$localeLongForm = self::getLongForm($languageCode, $countryCode);
|
||||
setlocale($category, $localeLongForm);
|
||||
|
||||
return true;
|
||||
return setlocale($category, $localeLongForm);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user