Open pkiraly opened 2 years ago
I found a solution for this, but it is not a clean one.
1.) Add a Volume with this parameters
- domains:/opt/payara/appserver/glassfish/domains/
2.) start docker and wait until Dataverse is ready
docker-compose up
3.) stop dataverse
Optional 4.) Copy everything from the "domains" Volume in the docker-compose parth
Optional
5.) Add the "domains" folder as volume and remove the volume from point 1
- ./domains:/opt/payara/appserver/glassfish/domains/
6.) open the file "domains/config/domains.xml"
7.) Search for </java-config>
(there should be 2 entries in the file) and edit it.
replace
</java-config>
with
<jvm-options>-Ddataverse.lang.directory=/extern/lang</jvm-options>
</java-config>
you can change "/extern/lang" with something else, but it have to be a place in the dataverse image. I use the folder "/extern/lang/" but you can use "/lang/", or some other names, too.
8.) Mount the folder in the docker image. It has to be the same path as point 7.
- ./lang:/extern/lang
9.) create the folder "lang" I mounted in point 8. It has the be in the same folder as the docker-compose file.
10.) Add the language files in the "lang" folder. I used the files from: https://github.com/GlobalDataverseCommunityConsortium/dataverse-language-packs
You only have to add the .properties files, and not the folders.
Please check this script https://github.com/IQSS/dataverse-docker/blob/master/init.d/010-languages.sh
Thank you for the link to the script.
There is one problem with that approach.
With the use of the docker-compose.yml file, the setting of
asadmin --user=${ADMIN_USER} --passwordfile=${PASSWORD_FILE} create-jvm-options '-Ddataverse.lang.directory=/opt/payara/langproperties'
will get lost after a restart.
I even tried the following.
zip languages.zip *.properties
asadmin --user=${ADMIN_USER} --passwordfile=${PASSWORD_FILE} create-jvm-options '-Ddataverse.lang.directory=/opt/payara/langproperties'
curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"
Nothing changed with that approach.
With the use of a volume
`- domains:/opt/payara/appserver/glassfish/domains/`
and the one line from the script
`asadmin --user=${ADMIN_USER} --passwordfile=${PASSWORD_FILE} create-jvm-options '-Ddataverse.lang.directory=/opt/payara/langproperties'`
it would work.
In the last section of the README there is an emphasis on multilinguality, but there is no description on how to change language versions of the interface? Is it available out of the box (that's what README suggests)? If not, please describe the steps to add language files.