The language of the list of countries does not change in any form [OJS 3.3.0.5]

Thanks for reply @NateWr!
I did some of the experiments described in [OJS 3.2.0.3] Countries and Currencies locales - #11 by asmecher and in GitHub - sokil/php-isocodes: PHP library providing ISO codes with localization: country (ISO 3166-1), subdivision (ISO 3166-2), language (ISO 639-3), currency (ISO 4217) and scripts (ISO 15924) on the local MAMP for MacOS. My primary language in OJS is Russian, and my second language is English. The output of locale -a contains “ru_RU” and many others languages, but output of the localetest.php is “Ukrainian” too. I tried different combinations of languages. For example, for

<?php

$locale = 'en_US';

putenv('LANGUAGE=' . $locale . '.UTF-8');
putenv('LC_ALL=' . $locale . '.UTF-8');
setlocale(LC_ALL, $locale . '.UTF-8');

require_once('lib/pkp/lib/vendor/autoload.php');
$isoCodes = new \Sokil\IsoCodes\IsoCodesFactory();
$languages = $isoCodes->getLanguages();

echo $languages->getByAlpha2('ru')->getLocalName() . "\n";

Russian is always displayed at any position of the “language switch”. Note that in the OJS interface, at any position of the language switch, a list of countries is always displayed in the second (English) language only.

The same problem exists on my working server on Solaris. But before requesting a technical team, I would like to understand how to solve this problem locally in MAMP for MacOS (I am the King and almost God here :slight_smile: ) Where can I find the cause of the problem?

P.S. I changed the program above by doing an experiment even with $locale = 'ru_RU';. The output is still Russian, but not Русский