Skip to content

Commit 0854019

Browse files
committed
how to set up languages in Docker #10939
Also, explain that Payara must be restarted after loading langs.
1 parent d039a10 commit 0854019

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## Multiple Language in Docker
2+
3+
Configuration and documentation has been added to explain how to set up multiple languages (e.g. English and French) in the tutorial for setting up Dataverse in Docker.
4+
5+
See also #10939

doc/sphinx-guides/source/container/running/demo.rst

+17
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,23 @@ In the example below of configuring :ref:`:FooterCopyright` we use the default u
137137

138138
One you make this change it should be visible in the copyright in the bottom left of every page.
139139

140+
Multiple Languages
141+
++++++++++++++++++
142+
143+
Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages such as English and French.
144+
145+
To set up the toggle between English and French, we'll use a slight variation on the command in the instructions above, adding the unblock key we created above:
146+
147+
``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'``
148+
149+
Similarly, when loading the "languages.zip" file, we'll add the unblock key:
150+
151+
``curl "http://localhost:8080/api/admin/datasetfield/loadpropertyfiles?unblock-key=unblockme" -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"``
152+
153+
Stop and start the Dataverse container in order for the language toggle to work.
154+
155+
Note that ``dataverse.lang.directory=/dv/lang`` has already been configured for you in the ``compose.yml`` file. The step where you loaded "languages.zip" should have populated the ``/dv/lang`` directory with files ending in ".properties".
156+
140157
Next Steps
141158
----------
142159

doc/sphinx-guides/source/installation/config.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ Now that you have a "languages.zip" file, you can load it into your Dataverse in
17831783

17841784
``curl http://localhost:8080/api/admin/datasetfield/loadpropertyfiles -X POST --upload-file /tmp/languages/languages.zip -H "Content-Type: application/zip"``
17851785

1786-
Click on the languages using the drop down in the header to try them out.
1786+
Stop and start Payara and then click on the languages using the drop down in the header to try them out.
17871787

17881788
.. _help-translate:
17891789

docker-compose-dev.yml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ services:
5757
-Ddataverse.pid.fake.label=FakeDOIProvider
5858
-Ddataverse.pid.fake.authority=10.5072
5959
-Ddataverse.pid.fake.shoulder=FK2/
60+
-Ddataverse.lang.directory=/dv/lang
6061
ports:
6162
- "8080:8080" # HTTP (Dataverse Application)
6263
- "4949:4848" # HTTPS (Payara Admin Console)

docker/compose/demo/compose.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ services:
2626
-Ddataverse.pid.fake.label=FakeDOIProvider
2727
-Ddataverse.pid.fake.authority=10.5072
2828
-Ddataverse.pid.fake.shoulder=FK2/
29+
-Ddataverse.lang.directory=/dv/lang
2930
ports:
3031
- "8080:8080" # HTTP (Dataverse Application)
3132
- "4848:4848" # HTTP (Payara Admin Console)

0 commit comments

Comments
 (0)