320 likes | 465 Views
uPortal Internationalization. Justin Tilton President Instructional Media + Magic U.S.A. Shoji Kajita Associate Professor, PhD IT Center, Nagoya University Japan. This Session’s Agenda. “Overview of uPortal I18n” by Shoji Kajita Target: 2.2 Release on October, 2003
E N D
uPortal Internationalization Justin TiltonPresident Instructional Media + Magic U.S.A. Shoji Kajita Associate Professor, PhD IT Center, Nagoya University Japan
This Session’s Agenda • “Overview of uPortal I18n” by Shoji Kajita • Target: 2.2 Release on October, 2003 • “XLIFF and uPortal” by Justin Tilton • Target: Beyond 2.2 Release
Overview of uPortal I18n Shoji Kajita Associate Professor, PhD IT Center, Nagoya University Japan
Quick Poll • How many languages do you want to support on your institutional portal? • One Language • Two Languages • More than Three Languages • What language do you expect to be supported by uPortal?
Agenda • Goal • Things To be Done • By uPortal Framework Developer • By XSL Files Translator • By uPortal Channel Developer • Short Demonstration • Localized uPortal into Japanese • I18ned uPortal under development
Locale • A set of conventions affected or determined by human language and customs, as defined within a particular geo-political region. • These conventions include (but are not necessarily limited to) the written language, formats for dates, numbers and currency, sorting orders, etc. (Frank Tang: “Mozilla I18n & L10n Guideline”)
Locale Used in uPortal • Locale = “Language Code” + “Country Code” • To support Celtic and Welsh, uPortal development team decided to use ISO 639-2: three letter language codes ISO 3166: three letter country codes • Examples: eng_USA, eng_GBR, jpn_JPN, swe_SWE
InternationalizationFrank Tang: “Mozilla I18n & L10n Guideline” • Designing and developing a software product to function in multiple locales. • This process involves identifying the locales that must be supported, designing features which support those locales, and writing code/transformations that functions equally well in any of the supported locales. (Frank Tang: “Mozilla I18n & L10n Guideline”)
Goal of uPortal Internationalization Locale Independent Components, Resources and Processing US English Chinese UKEnglish Japanese Swedish • Separating locale dependent components, resources and processing • Preparing translated resources for each locale • Allowing users to select their locale resource
What kind of work is required to internationalize uPortal? By localizing Number Guessing Game into Japanese
XSLT Processor CNumber Channel XSLOriginal 2 CNumber Channel XSLJapanese A language selection mechanismis required Localization Number Guessing Game into Japanese CNumber ChannelXML 1
3 The string “higher” is hardcoded in CNumber.java 4 The title string is saved in UP_CHANNEL table of RDBMS Number Guessing GameJapanese Version
uPortal I18n is Collaborative Works • Framework Developers • XSL Files Translators • Channel Developers
XXX: UTF-8 Characters RDBMS XXX XXX uPortal XXX XXX XXX Properly saved 1. Things to be Done byuPortal Framework Developers (1) UTF-8 Transparency(Usually, Latin1 Transparent) Properly displayed “UTF-8 transparent” in uPortal2.1/2.0.3 framework
1. Things to be Done byuPortal Framework Developers (2) Locale-aware Processing • Locale Selection Mechanism for Users
Locale Selection Mechanism for Users Users can select their desired locale by clicking the language icon
1. Things to be Done byuPortal Framework Developers (2) Locale-aware Processing • Locale Selection Mechanism for Users • Passing Locale[] into Channel • User Preferred Locales • Browser Setting • CLocaleChooser (Locale Selection Mechanism) • Channel Dependent User Preference • External System (ex. LDAP)
Passing Locale[] into Channel public class ChannelRuntimeData … { .................... private String Locale[]; …………….. }
1. Things to be Done byuPortal Framework Developers (2) Locale-aware Processing • Locale Selection Mechanism for Users • Passing Locale[] into Channel • User Preferred Locales • Browser Setting • Locale Selection Mechanism • External system (ex. LDAP) • Framework Supported Locales • Locale-Dependent Resource Selection Mechanism
Locale-Dependent Resource Selection Mechanism (XSL Files) XSLT xslt = new XSLT(this); LocaleAwareXSLT xslt = new LocaleAwareXSLT(this, locale); 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
2. Things to be Done byTranslators • XSL Files Translation into Each Language • Wiki-based Translation Site • XLIFF-based Translation Site(Near future) http://www.itc.nagoya-u.ac.jp/~kajita/hiki/hiki.cgi
3. Things to be Done byuPortal Channel Developers • UTF-8 Transparency
1. UTF-8 Transparency for Channel XXX Channel ??? RDBMS XXX XXX uPortal2.1 ? ? ??? ??? CWebProxy:●→ ● committed in CVS CBookmark:●→ ● reported in Bugzilla CWebCT: ●→ ● fixed but not checked in CVS repository UBC Webmail: ●→ ● fixed but not checked in CVS repository CuCMS: ● done by Alex “UTF-8 transparency” is depending on channel
CBookmark CWebProxy
3. Things to be Done byuPortal Channel Developers • UTF-8 Transparency • Functions to select Locale from Locale[] • Locale Dependent Resources • XSL Files • ResourceBundle to use locale-dependent resources in Java code
A Short Demonstration of Localized uPortal into Japanese http://mynu.jp/
We Need Volunteer! • Translation of XSL files • Framework Development • Developer Meeting at Cornel University on August
uPortal Internationalization • More than software problem • Forming the uPortal International community to exchange knowledge, know-how, tools and so on among higher educational institutions in the world!