Hello community,
Wanting to create a category, the translation of titles is not done. Thus, on the page of my magazine, the titles appear in the same way. See screenshots.
I need your help to solve this problem.
Thank you.
OJS Version : 3.1.2-1
Hello community,
Wanting to create a category, the translation of titles is not done. Thus, on the page of my magazine, the titles appear in the same way. See screenshots.
I need your help to solve this problem.
Thank you.
OJS Version : 3.1.2-1
Hi @ANKY_Raugland,
Have a look at https://pkp.sfu.ca/wiki/index.php?title=Translating_OxS for information on translating OJS.
Regards,
Alec Smecher
Public Knowledge Project Team
Hello Asmecher,
I tried to read the content but can not find a real direction to translate these blocks that are not displayed as on the images. I would like to pass my review online but not with these blocks have translated.
cordially
Hi @ANKY_Raugland,
The easiest way to locate the file to which a translation needs to be added is to search for the same locale key in the set of English files. What operating system are you using? I may be able to suggest specific instructions to search the OJS codebase.
Regards,
Alec Smecher
Public Knowledge Project Team
Hello,
I am on MAC OSX with MAMP PRO.
cordially
Hi @ANKY_Raugland,
I believe you should be able to use *NIX-style find/grep commands on MacOSX. Try this on the command line…
cd /path/to/ojs-installation
find /path/to/ojs-installation -wholename \*en_US\*.xml -exec fgrep -l grid.category.categoryDetails "{}" ";"
Replace /path/to/ojs-installation
with your OJS installation directory, and grid.category.categoryDetails
with the name of the untranslated locale key you want to find.
This will tell you what English locale file contains the key you’re looking for. Running the above, for example, I get…
./lib/pkp/locale/en_US/manager.xml
This tells me what file the grid.category.categoryDetails
locale key is in for the English language. If I’m using Canadian French and want to add that key to that translation, I would edit lib/pkp/locale/fr_CA/manager.xml
and add the same key there.
Regards,
Alec Smecher
Public Knowledge Project Team
Hello,
After execution of the order:
cd / path / to / ojs-installation
find / path / to / ojs-installation -wholename \ * en_US \ * .xml -exec fgrep -l grid.category.categoryDetails “{}” ";"
in the terminal, I have this result:
/Applications/MAMP/htdocs/umng//lib/pkp/locale/en_US/manager.xml
On the other hand \ * en_US * \ by \ * fr_CA * \ I have:
/Applications/MAMP/htdocs/umng//lib/pkp/locale/fr_CA/submission.xml
Replacing \ * en_US \ * with \ * en_FR \ * in the command, there is nothing against it in return. What should I do from this moment?
Cordially
Hi @ANKY_Raugland,
Which language do you wish to translate?
Regards,
Alec Smecher
Public Knowledge Project Team
Hello,
I would like to translate into the French language: fr_FR
cordially
Hi @ANKY_Raugland,
If you’ve determined that a locale key appears in the English locale in e.g. lib/pkp/locale/en_US/manager.xml
, but doesn’t appear in the French locale, then you’d need to add it to the corresponding French locale file: lib/pkp/locale/fr_FR/manager.xml
Regards,
Alec Smecher
Public Knowledge Project Team
Maybe I did not make myself clear, I have the file manager.xml in lib / pkp / locale / en_US / manager.xml, and submission.xml in / lib / pkp / locale / fr_CA / submission. xml.
In the folder / lib / pkp / locale / fr_FR / I have the file: manager.xml and submission.xml
Which file should I use to do the translation?
Cordially
Hi @ANKY_Raugland,
You mentioned the fr_FR translation above, so the relevant file would be lib/pkp/locale/fr_FR/manager.xml
.
Regards,
Alec Smecher
Public Knowledge Project Team
Hello,
So do I have to copy the manage.xml file from the folderlib / pkp / locale / en_US / manager.xml to the lib / pkp / locale / en_US / manager.xml folder and make the change? Or are there other settings to do? My apologies if I insist on this because I do not really see how to solve this problem before the production of my magazine.
cordially
Hi @ANKY_Raugland,
Let me walk you through the example of grid.category.categoryDetails
.
Using the search command I described in above, that locale key appears in the English translation in lib/pkp/locale/en_US/manager.xml
. If you look in that file you’ll see:
<message key="grid.category.categoryDetails">Category Details</message>
The problem is that the equivalent string is missing from the equivalent French file, lib/pkp/locale/fr_FR/manager.xml
. If you look in that file, you won’t find grid.category.categoryDetails
.
To fix that, you can add this to the file:
<message key="grid.category.categoryDetails">Détails de la catégorie</message>
The order of <message>
elements in the file does not matter, as long as the file is valid XML. You might find an XML validator such as xmllint
helpful if you work with these files a lot.
Regards,
Alec Smecher
Public Knowledge Project Team