We have a new Finnish translation for OJS3. After a test upgrade from OJS2 to OJS3 I tried to load the new translated templates to the journals, but can not get the system to reload the templates. Instead I get the English version instead of the Finnish version.
The same problem applies also to role names and other cases where a journal can change the default values.
I understand that the values are in the database, but do not seem find the place where to flush the database.
OJS 3.0.1.
Ok, so I found the place of course right after posting the topic here:
This solves the problem with the email templates for all journals. Also when I go to the article components listing, I can press “Restore defaults” and get the new Finnish translations there as well.
However, what I can not figure out is how to relaod the rolenames? For all the new journals I install to OJS3 these are translated, but how do I get these translated for the journals migrated from OJS2? At the moment I can only see the English translations even though I select the Finnish translation:
These are installed from the XML when the journal is created. If I were dealing with one or two journals, I’d just edit the roles and set the translations via the interface – is that feasible for you?
Regards,
Alec Smecher
Public Knowledge Project Team
We have maybe around 20 multi language journals, most of them operating with English and Finnish. So doing this manually is a fair amount of work. I already have a lot small tweeks I need to do after the upgrade to OJS3 to fix things so finding a better solution would be nice. I guess I will look around in the database.
I was a bit wrong with the role names and creating multilingual journals. It seems that when creating a new journal in OJS3 the rolenames are only saved in the primary locale. So basically everytime a new journal is created, you have to enter the translations manually for the role names.
// add the i18n keys to the settings table so that they
// can be used when a new locale is added/reloaded
However, reloading a locale does not result into adding other translations to the role names.
When looking at the code there starting from line 721
// add the i18n keys to the settings table so that they
// can be used when a new locale is added/reloaded
$this->updateSetting($userGroup->getId(), 'nameLocaleKey', $nameKey);
$this->updateSetting($userGroup->getId(), 'abbrevLocaleKey', $abbrevKey);
// install the settings in the current locale for this context
$this->installLocale(AppLocale::getLocale(), $contextId);
I was thinkin that should the installLocale function be called (foreach) by something like $site->getInstalledLocales() instead of a single locale?
Edit2: this seems to work now that I add new journals in OJS3. It will probably also fix the same issue when upgrading from OJS2: