Skip to Main Content
the logo for the Library Services Platform: California Community Colleges

Systems Work Group

LSP Systems Work Group Main LibGuide- information on events, documentation, and resources

Enabling an additional institutional language

From the configuration menu at the institutional level, navigate to General > General Configuration > Institutional Languages.

  1. Locate the Language: Find the language you want to customize.
  2. Access Customization Options: Click on the ellipses (…) located on the right side of the language row.
  3. Select ‘Customize’: From the options that appear, choose ‘Customize’.
  4. Enable the Language: Toggle the switch on the row to the ‘On’ position.
  5. Save Changes: Click ‘Save’ to apply the customization.

Adjusting translated Discovery view labels

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.

  • Select the ellipses for the code table you want to customize, and select Edit.
  • To display the translated text click the Filter button at the top-left and select your desired language. 
  • You can export code tables into an .xslx spreadsheet, enter the desired translations, and import the entire code table using the Import option. Or do them all individually... choose your own adventure.

Adding letter label translations

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>

 

Updating the User's Preferred Language

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.

Changing the Preferred Language for a Single User

Within the user account, navigate to General Information, select the desired Preferred language from the dropdown and save the account.

Changing the Preferred Language for a Batch of Users

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:

  • Make a GET request to the /almaws/v1/users/{user_id} endpoint to retrieve the user object.
  • Change the preferred_language value and desc: 

Example of a Spanish preferred language object:

{
  "value": "es",
  "desc": "Spanish"
}

  • Send a PUT request back to /almaws/v1/users/{user_id} with the override=preferred_language parameter so the change is retained through the next SIS load.

Python example of a batch editing script

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