Presentation is loading. Please wait.

Presentation is loading. Please wait.

uPortal Internationalization for 2.2 Release

Similar presentations


Presentation on theme: "uPortal Internationalization for 2.2 Release"— Presentation transcript:

1 uPortal Internationalization for 2.2 Release
Shoji Kajita Information Technology Center Nagoya University Japan

2 Updates New Locale class for uPortal or the original Locale class?
Answer: Write a letter for SUN Microsystems to push the support of three letter codes in Locale class

3 TODO items for 2.2 Release UI Changes Database Changes
Resource Translations XSL files Default database settings Codes Changes For framework For default channels Documentation for i18ned Channel Developer Beyond 2.2 Release

4 (Aggregated Layout done by Justin and Mike)
1. UI Changes To let users select the language to be rendered in subscribing channels (Aggregated Layout done by Justin and Mike)

5 2. Database Changes One additional column in UP_LAYOUT_STRUCT table
Three new table UP_CHANNEL_MDATA UP_CHAN_TYPE_MDATA UP_LAYOUT_STRUCT_MDATA

6 UP_LAYOUT_STRUCT (new “LOCALE” column)
<table> <name>UP_LAYOUT_STRUCT</name> <desc>Holds the order of a user's layout structure - the order in the user layout of channels subscribed to, the order of layout components (columns for example)</desc> <columns> <column> <name>USER_ID</name> ….. <column> <name>LAYOUT_ID</name> ….. <column> <name>STRUCT_ID</name> ….. <column> <name>NEXT_STRUCT_ID</name> ….. <column> <name>CHLD_STRUCT_ID</name> ….. <column> <name>EXTERNAL_ID</name> ….. <column> <name>CHAN_ID</name> ….. <column> <name>NAME</name> ….. <column> <name>TYPE</name> …… <column> <name>HIDDEN</name> …… <column> <name>IMMUTABLE</name> …… <column> <name>UNREMOVABLE</name> …… <column> <name>LOCALE</name> <type>VARCHAR</type> <param>7</param> <desc>Comma Delaminated, Locale of this struct entry, eng_USA, jpn_JPN, swe_SWE, etc. Required for I18n. Ask Shoji.</desc> </column> </columns> </table>

7 UP_CHANNEL_MDATA (new table)
<name>UP_CHANNEL_MDATA</name> <desc>Channel's Meta Data - this table holds the meta data elements of a channel used as a default for all users</desc> <columns> <column> <name>CHAN_ID</name> <type>INTEGER</type> <desc>Channel ID is a unique sequence number generated by the portal - primary key, see UP_SEQUENCE</desc> </column> <column> <name>LOCALE</name> <type>VARCHAR</type> <param>7</param> <desc>Locale - the locale of meta data element</desc> <column> <name>CHAN_TITLE</name> <type>VARCHAR</type> <param>128</param> <desc>Channel title - it appears at the top title bar of the channel</desc> <column> <name>CHAN_NAME</name> <type>VARCHAR</type> <param>128</param> <desc>Channel name - used for display name of channel for subscribe, usually the same as title</desc> <column> <name>CHAN_DESC</name> <type>VARCHAR</type> <param>255</param> <desc>Channel description - provides additional information to the user about the channel to help him or her select a channel to subscribe to</desc> </columns> </table>

8 UP_CHANNEL_MDATA (new table)

9 UP_CHAN_TYPE_MDATA (new table)
<name>UP_CHAN_TYPE_MDATA</name> <desc>Channel Type's Meta Data - this table holds the meta data elements of a channel type</desc> <columns> <column> <name>TYPE_ID</name> <type>INTEGER</type> <desc>Type ID is a unique sequence number generated by the portal - primary key</desc> </column> <column> <name>TYPE_NAME</name> <type>VARCHAR</type> <param>70</param> <desc>Type name is a short description of the java class displayed during publish</desc> <column> <name>TYPE_DESCR</name> <type>LONGVARCHAR</type> <desc>Type description of the java class</desc> <column> <name>LOCALE</name> <type>VARCHAR</type> <param>7</param> <desc>Locale - the default locale of channel type</desc> </columns> </table>

10 UP_CHAN_TYPE_MDATA (new table)

11 UP_LAYOUT_STRUCT_MDATA (new table)
<name>UP_LAYOUT_STRUCT_MDATA</name> <desc>Channel Type's Meta Data - this table holds the meta data elements of a channel type</desc> <columns> <column> <name>TYPE_ID</name> <type>INTEGER</type> <desc>Type ID is a unique sequence number generated by the portal - primary key</desc> </column> <column> <name>TYPE_NAME</name> <type>VARCHAR</type> <param>70</param> <desc>Type name is a short description of the java class displayed during publish</desc> <column> <name>LOCALE</name> <type>VARCHAR</type> <param>7</param> <desc>Locale - the default locale of channel type</desc> <column> <name>TYPE_DESCR</name> <type>LONGVARCHAR</type> <desc>Type description of the java class</desc> </columns> </table>

12 3. Resource Translations
Wiki-based Translation Site To help translators in making dictionary 8 Languages hosted

13

14

15

16

17 3. Resource Translations
Wiki-based translation site To help translators in making dictionary 8 Languages hosted Targeted languages in 2.2 release Japanese, Swedish, German, French, …

18 4. Code Changes Internal Representation of Locale LocaleManager Class
Array of Locale in RuntimeData Locale-aware XSLT

19 Internal Representation of Locale As String object or Locale object?
In most of cases at the framework level, it is enough to treat locale information as “String” (ex) XSL filename, locale in DB “Do we have to use Locale object as the internal representation of Locale at the framework level?” Of course, we need to use Locale class to get advantage of Locale class features like ResourceBundle, Date format, Currency, …

20 LocaleManager Class The central place to manage all of locale information User’s channel subscribe setting Channel’s publish time setting User’s user-wide setting Browser specified settings (HTTP session, accept_language) uPortal wide setting JVM default locale setting

21 Locale[] in RuntimeData
public class ChannelRuntimeData … { private Locale Locale[]; …………….. } In some cases, channel wants to know the source or context of Locale specified.

22 Interpretation of Locale[]
Locale[0] = uPortal default locale specified in portal.properties Locale[1] = from user profile Locale[2] = from user layout Locale[3] = from channel definition Locale[4] = from browser (i.e. ACCEPT_LANGUAGE) Locale[5] = from HTTP session parameter

23 Locale-aware XSLT XSLT xslt = new XSLT(this);
Locale[] locales = runtimeData.getLocales(); LocaleAwareXSLT xslt = new LocaleAwareXSLT(this, locales[0]); xslt.setXML(doc); xslt.setXSL(sslLocation, runtimeData.getBrowserInfo()); xslt.setTarget(out); xslt.setStylesheetParameter("baseActionURL", runtimeData.getBaseActionURL()); if (!staticData.getPerson().getSecurityContext().isAuthenticated()) { xslt.setStylesheetParameter("unauthenticated", "true"); } xslt.transform(); Don’t have to change

24 Locale dependent XSL files
-webpages/…/CLogin CLogin.ssl html.xsl  Default html_en.xsl html_en_US.xsl html_en_UK.xsl html.xsl.jpn_JPN html.xsl.swe_SWE (html.xsl_eng_GRB is better?)

25 5. Documentation for Channel Developer
General concept of uPortal i18n What is done in the level of framework Preparation of translated resources for each channel Guideline to write codes of locale aware channel by using i18ned Number Guessing Game The use of ResourceBundle The use of LocaleAwareXSLT The use of array of Locales in RuntimeData to select preferable locale

26 6. Beyond 2.2 Release Log message translation (Framework)
By using ResourceBundle The use of external language preference sources like LDAP More language supports The use of XLIFF technology

27 Target of I18n uPortal Framework Bundled default channels

28


Download ppt "uPortal Internationalization for 2.2 Release"

Similar presentations


Ads by Google