You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/sphinx-guides/source/container/running/demo.rst
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,19 +140,25 @@ One you make this change it should be visible in the copyright in the bottom lef
140
140
Multiple Languages
141
141
++++++++++++++++++
142
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.
143
+
Generally speaking, you'll want to follow :ref:`i18n` in the Installation Guide to set up multiple languages. (You need to create your own "languages.zip" file, for example.) Here will give you guidance specific to this demo tutorial. We'll be setting up a toggle between English and French.
144
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:
145
+
First, edit the ``compose.yml`` file and uncomment the following line:
146
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"}]'``
147
+
.. code-block:: text
148
+
149
+
#-Ddataverse.lang.directory=/dv/lang
148
150
149
-
Similarly, when loading the "languages.zip" file, we'll add the unblock key:
151
+
Next, upload "languages.zip" to the "loadpropertyfiles" API endpoint as shown below. This will place files ending in ".properties" into the ``/dv/lang`` directory configured above.
152
+
153
+
Please note that we are using a slight variation on the command in the instructions above, adding the unblock key we created above:
150
154
151
155
``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
156
153
-
Stop and start the Dataverse container in order for the language toggle to work.
157
+
Next, set up the UI toggle between English and French, again using the unblock key:
154
158
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".
159
+
``curl "http://localhost:8080/api/admin/settings/:Languages?unblock-key=unblockme" -X PUT -d '[{"locale":"en","title":"English"},{"locale":"fr","title":"Français"}]'``
160
+
161
+
Stop and start the Dataverse container in order for the language toggle to work.
0 commit comments