Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

Version 1 Next »

These are some quick guidelines to handle several language presentations in your uPortal. This document is built thanks to other people comments and notes. It is a draft and any comment or corrections will be appreciated.

Actions

There are actions at different scopes: the whole portal, each channel and each user.

1. Portal level

To enable the locale support you must modify the portal.properties file. For example to enable the presentation of contents in English (en_US), Spanish (es_ES) and Basque (eu_EU):

org.jasig.portal.i18n.LocaleManager.locale_aware=true
org.jasig.portal.i18n.LocaleManager.portal_locales=en_US,es_ES,eu_EU

(Note in the portal.properties file: Locales supported by this portal installation. Locales should be specified using a comma-separated list. Each locale should be represented by two letter country code, per ISO-639, and a two letter language code, per ISO-3166, separated by an underscore character.)

At this point (restarting uPortal) the portal tries to present contents (channels, descriptors, and so) according to the locale of user's navigator. If it finds the required components (described later) for the target language it presents them to user. For example, the login channel has several language implementations out of the box, simply installing uPortal.

2. For each (desired) channel

To be able to present itself in several languages each channel must have:

  • In the table UP_CHANNEL_MDATA an entry (row) for each language:

For example:

insert into UPDESA.UP_CHANNEL_MDATA (CHAN_ID, LOCALE, CHAN_TITLE, CHAN_NAME, CHAN_DESC) values (
909,
'es_ES',
'Expedientes',
'Consulta de expedientes',
'Consulta de expedientes')

insert into UPDESA.UP_CHANNEL_MDATA (CHAN_ID, LOCALE, CHAN_TITLE, CHAN_NAME, CHAN_DESC) values (
909,
'en_US',
'Student Profile',
'Student Profile',
'Student Profile')

  • In the channel directory (for example .../WEB-INF/classes/org/jasig/portal/channel/MyChannel)

A xsl file for each language presentation (for example, MyChannel_es_ES.xsl, MyChannel_en_US.xsl )

  • Usually you should use the methods of class LocaleManager in the java class associated to the channel. This class can access Locale information of user and/or portal to act accordingly at presentation.

3. Locate for each User (optional)

Inside uPortal, users (if enabled) can switch or select to specific locale. In the locale selector, users can choose among the locales defined in the portal.properties. Locale selection alters the table UP_USER_LOCALE and inserts a tuple if there was none, or updates it with the new preferred language (This table has a field to store a priority if there was more than one language, but seems is not yet used. up2.4.2)

References:

You can find several references about internationalization of uPortal in the mailing lists and uPortal distributions. A detailed explanation of the requirements and processing can be found at:

It is also useful taking a look at class LocaleManager (org.jasig.portal.i18n) It will help you to understand or use the tools it offers.

  • No labels