Skip to content

Commit

Permalink
do not overwrite locale to baselocale, keep separate
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Nov 28, 2024
1 parent bc81b04 commit 8727076
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Paths/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,23 +313,23 @@ private function loadNationalAndWiderRegionData(): void
*/
private function setLocale(): void
{
$this->EventsParams->Locale = \Locale::getPrimaryLanguage($this->EventsParams->Locale);
$baseLocale = \Locale::getPrimaryLanguage($this->EventsParams->Locale);
$localeArray = [
$this->EventsParams->Locale . '.utf8',
$this->EventsParams->Locale . '.UTF-8',
$this->EventsParams->Locale,
$this->EventsParams->Locale . '_' . strtoupper($this->EventsParams->Locale) . '.utf8',
$this->EventsParams->Locale . '_' . strtoupper($this->EventsParams->Locale) . '.UTF-8',
$this->EventsParams->Locale . '_' . strtoupper($this->EventsParams->Locale),
$this->EventsParams->Locale . '.utf8',
$this->EventsParams->Locale . '.UTF-8',
$this->EventsParams->Locale
$baseLocale . '_' . strtoupper($baseLocale) . '.utf8',
$baseLocale . '_' . strtoupper($baseLocale) . '.UTF-8',
$baseLocale . '_' . strtoupper($baseLocale),
$baseLocale . '.utf8',
$baseLocale . '.UTF-8',
$baseLocale
];
setlocale(LC_ALL, $localeArray);
bindtextdomain("litcal", "i18n");
textdomain("litcal");
self::$LitGrade = new LitGrade($this->EventsParams->Locale);
self::$LitCommon = new LitCommon($this->EventsParams->Locale);
self::$LitGrade = new LitGrade($baseLocale);
self::$LitCommon = new LitCommon($baseLocale);
}

/**
Expand Down

0 comments on commit 8727076

Please sign in to comment.