Contribute to the DSpace Development Fund

The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

DSpace supports a number of languages & you can even add your own translation.  This may also be referred to as Localization (l10n) or Internationalization (i18n).

Multilingual Support on the Backend (REST API)

In order to deploy a multilingual version of DSpace you have to configure two parameters in [dspace-source]/dspace/config/local.cfg:

  • default.locale, e.g. default.locale = en
  • webui.supported locales, e.g. webui.supported.locales = en, de

The Locales might have the form country, country_language, country_language_variant.

According to the languages you wish to support, you have to make sure that all the i18n related files are available.  In the backend this is the Messages.properties file.

Multilingual Support on the Frontend (UI)

The User Interface translations can be found in the /src/assets/i18n/ folder of your UI's codebase.  You can add additional translations & contribute them back to the project. For details see DSpace 7 Translation - Internationalization (i18n) - Localization (l10n)

All translations of the UI are provided in JSON5 format, which includes support for inline comments.

You can choose which languages you wish to enable/support in your UI by modifying this section of your environment.prod.ts configuration file:

  // Default Language in which the UI will be rendered if the user's browser language is not an active language
  defaultLanguage: 'en',
  // Languages. DSpace Angular holds a message catalog for each of the following languages.
  // When set to active, users will be able to switch to the use of this language in the user interface.
  languages: [{
    code: 'en',
    label: 'English',
    active: true,
  }, {
    code: 'de',
    label: 'Deutsch',
    active: true,
  }, {
    code: 'cs',
    label: 'Čeština',
    active: true,
  }, {
    code: 'nl',
    label: 'Nederlands',
    active: true,
  }],

As shown above, the "defaultLanguage" is the language that your UI will use by default , if the user's browser has not specified a preferred language

The array of "languages" are all of the additional languages you wish to support. 

  • The "code" must match the prefix of a *.json5 language file located in your /src/assets/i18n/ folder
  • The "label" is the text you want to display in the UI language selector (the globe in the header)
  • The "active" setting allows you to decide whether that language appears in the UI language selector or not.

Any changes to the language settings require rebuilding & redeploying your UI.

  • No labels