Languages module

About

Use the Languages module to customize interface text in Content Hubs, the legacy Video Portal, and LMS Extensions.

You can add custom languages, replace translated text, import or export text exceptions, and create tokens for text such as email templates.

The Languages module is case-sensitive.

Watch this video for an overview of customizing language and text in the video portal.

Before you start

In the Application module, configure the languages available on your site:

  • languageConfiguration – Choose a single-language or multi-language instance.
  • languageSelection – If you chose a multi-language instance, select the languages users can choose from.
  • language – Select the default language for new users.

Language settings in the Application module

The languages available in languageSelection include Kaltura’s built-in languages and any custom languages previously added by an administrator.

In Content Hubs, selecting Arabic, Hebrew, Persian (Farsi), Urdu, Yiddish, Syriac, Divehi (Maldivian), Pashto, or Sorani Kurdish as the display language also changes the site layout to right-to-left.

Configure the Languages module

Go to your Configuration Management console, locate the Languages module in the left panel, then select it. You can also go directly to https://{your_site_URL}/admin/config/tab/languages.

The Languages page displays.

Languages module settings

Download interface text

Use DownloadLocaleText to download the current interface text for the languages used on your site.

  1. Click Download Texts. A ZIP file downloads with the interface text files.
  2. Open the file for the language you want to customize. The files contain the words and phrases displayed in the site interface.
  3. Edit the text using a translation editor, such as Poedit. The file you upload as a custom language must be in binary .mo format.

Download Texts button

Example of an English PO file:

English PO file example

Add a custom language

If the language you need is not available, add it under UploadCustomLanguage.

  1. Click +Add "UploadCustomLanguage".
  2. The custom language fields display.

    Custom language fields

  3. Complete the following fields:
    • languageAdminName – Enter the name displayed to administrators in the languageSelection and language fields of the Application module.
    • languageClientName – Enter the name displayed to users in the language drop-down menu.
    • languageCode – For LMS integrations, select the language code used to synchronize the interface language with the hosting application.
    • localeFile – Upload your customized .mo file. You can convert a .po file to .mo format using a translation tool.
    • localeIcon – Click Upload Flag to add a flag icon to the language drop-down menu in the legacy Video Portal. Supported formats are JPG, JPEG, BMP, PNG, GIF, TIF, TIFF, and ICO. For best results, use an image measuring 30 × 26 pixels. Larger images are resized automatically.
    • languageId – Enter a unique language ID for application use.
  4. Click Save.

In LMS Extensions, the LMS determines the interface language. To override its default text with a custom language, set languageCode to match the language code used by the LMS.

Replace interface text for a language

Use LanguageException to replace a specific interface string without uploading a complete custom language file. You can use exceptions to change terminology or provide text for multi-language events.

  1. Download the English PO file from DownloadLocaleText and find the msgid for the text you want to replace.
  2. Click +Add LanguageException.
  3. Add LanguageException button

    Additional fields display.

    Language exception fields

  4. Complete the fields:
    • Language – Select the language to which the exception applies.
    • msgid – Copy the exact msgid from the PO file. The value is case-sensitive.
    • Exception – Enter the replacement text.
  5. Example of a msgid in a PO file

    You can also replace a term with another term in the same language:

    Example of a language exception

    The Language list comes from the available PO files. If a PO file is removed, its exception can remain in the configuration, but the replacement text does not display.

  6. Click Save.

Export or import language exceptions

Use importAndExportExceptions to manage language exceptions in a CSV file.

Export exceptions

  1. In the importAndExportExceptions section, click Expand.
  2. Expand import and export exceptions

    An additional field opens.

  3. Click Export Exceptions.
  4. Export Exceptions button

    A CSV file containing your configured exceptions downloads.

    The CSV file has no header row. Its three columns contain the language, msgid, and exception text, in that order.

    Example of an exported exceptions CSV file

Import exceptions

Importing a CSV file replaces all existing language exceptions. Export your current exceptions first if you need a backup.

  1. Under importAndExportExceptions, go to the Import field and click Choose file.
  2. Select the CSV file containing the exceptions you want to import.
  3. Click Save.

Create custom tokens

Use CustomToken to insert reusable text into fields such as email templates and disclaimers.

You can give a token a different value for each language. When the site language changes, the corresponding value displays.

The following system tokens are reserved and cannot be used as custom token IDs: {FIRSTNAME}, {LASTNAME}, {TITLE}, {COMPANY}, {COUNTRY}, {EMAIL}, and {URL}.

  1. Click +Add "CustomToken".
  2. Add CustomToken button

    The TokenID field displays.

    TokenID field

  3. In TokenID, enter an alphanumeric ID. You will use the ID in other modules in the format {Your_Token_ID}.
  4. Click +Add "LocalizedToken".
  5. Add LocalizedToken button

    The language and value fields display.

    Localized token language and value fields

  6. Complete the fields:
    • Language – Specify the language code for this token value.
    • TokenValue – Enter the text to display wherever the custom token is used.
  7. Add another localized token for each additional language you need. If the value does not need translation, add one localized token.

  8. Click Save.

Custom token example

In this example, SITETITLE is the token ID.

SITETITLE custom token configuration

The token is inserted in the Disclaimer field inside curly brackets.

SITETITLE token used in a disclaimer

The configured TokenValue, “my super site,” replaces the token in the displayed disclaimer. You can change the value without editing the disclaimer itself.

You can also add a value for another language, such as “Los Videos” for Spanish:

Spanish value for a custom token

When the site language changes, the disclaimer displays the token value configured for that language.

Disclaimer displaying the Spanish token value


Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted.

In this article
Related articles