In the user registration form and contributor registration form, the country name is displayed in English in the pull-down menu for selecting the country name.
The English country name is displayed on both the Japanese page and the English page any time.
I’ve read similar articles in the past (3 points below), but no matter what I do, I can’t solve the problem.
https://forum.pkp.sfu.ca/t/the-language-of-the-list-of-countries-does-not-change-in-any-form-ojs-3-3-0-5/ 67121 https://forum.pkp.sfu.ca/t/ojs-submission-locale/32702/3 https://forum.pkp.sfu.ca/t/change-language-of-countries-in-register-page/64933/4
My environment OS is Ubuntu 20.04, and the locale setting of OPS (22.214.171.124) is Japanese (ja_JP.UTF-8) as the primary locale and English (en_US.UTF-8) as the secondary locale.
The following is added to registry/locales.xml.
<locale key="ja_JP" complete="true" name="Japanese" iso639-2b="jpn" iso639-3="jpn" />
In config.inc.php, “locale=ja_JP” is set.
[i18n] Default locale; Default locale ; locale = en_US locale = ja_JP
Also, when I created and executed the following script, “日本” is displayed without any problem.
<?php $locale = 'ja_JP'; 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(); $countries = $isoCodes->getCountries(); echo $countries->getByAlpha2('JP')->getLocalName() . "\n";
By the way, on AWS AmazonLinux2 (OPS settings are all the same as Ubuntu), the Japanese country name is displayed in Japanese on the Japanese page, and the country name is displayed in English on the English page without any problem.
In addition, the default locale is “ja_JP.UTF-8” for both Ubuntu / Amazon Linux2.
# cat /etc/default/locale LANG = ja_JP.UTF-8 #LANGUAGE = ja_JP.UTF-8 LC_ALL = ja_JP.UTF-8
What else should I check? I would appreciate it if you could teach me.
Thanks in advance.