From the configuration menu at the institutional level, navigate to General > General Configuration > Institutional Languages
.
From the configuration menu at the institutional level, navigate to Discovery > Display Configuration > Labels
.
You'll be presented with a long list of code tables. Each code table will contain the Code, Description, and Translation.
From the configuration menu at the institutional level, navigate to General > Letters > Letters Configuration
Select the letter you wish to customize by clicking on the hyperlinked letter name, or clicking the ellipses and selecting Edit.
Click the Filter button and select the desired target language. A Translation column will appear that contains the translated label. Customize each row individually, or export as an .xslx file, add or adjust the translation, and import.
Any text that isn't embedded in a label (hardcoded text) will need to be translated manually. You can do this by testing a language element in the notification_data
xml, and placing your translated text within the executed block of code. Here's an example using a conditional statement that would produce different text content for users who had a preferred language of English (en) vs Spanish (es):
<xsl:if test="/notification_data/receivers/receiver/user/user_preferred_language='en'">
<!-- your English content here -->
</xsl:if>
<xsl:if test="/notification_data/receivers/receiver/user/user_preferred_language='es'">
<!-- your Spanish content here -->
</xsl:if>
In order for a user to receive a notification in a language other than system default, the preferred language must be changed in the user account. Ideally, you would have this passed in through the SIS load.
Within the user account, navigate to General Information, select the desired Preferred language from the dropdown and save the account.
If you want to change the preferred language of user accounts in batches after they are loaded in, you'll need to use the users REST API and a custom script to do it.
The basic structure of the process is:
preferred_language
value and desc: Example of a Spanish preferred language object:
{
"value": "es",
"desc": "Spanish"
}
override=preferred_language
parameter so the change is retained through the next SIS load.This Jupyter notebook can be used to update the preferred language facet for a batch of users to Spanish, or as a model to use for building out a similar solution in a different language. Requires a users API key with r/w access, and a spreadsheet with a list of ID's in a column titled "id". Test on a small batch of users first.
https://github.com/JayHartzell/preferred_lang_updater
Or directly in Colab if you'd prefer:
https://colab.research.google.com/drive/1Bh6U75mecuBeUavq1cXd0l7M-W7W1uii?usp=sharing