Date post: | 20-Dec-2015 |
Category: |
Documents |
View: | 213 times |
Download: | 0 times |
uPortal Internationalization
Shoji KajitaAssociate Professor, PhD
IT Center, Nagoya University
Japan
Justin TiltonPresident
Instructional Media + Magic
U.S.A.
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
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 devel
opment 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 IndependentComponents, Resources
and ProcessingUS
English
UKEnglish Swedish
Japanese
Chinese
1. Separating locale dependent components, resources and processing
2. Preparing translated resources for each locale
3. Allowing users to select their locale resource
What kind of work is required to internationalize uPortal?
By localizing Number Guessing Game into Japanese
Localization Number Guessing Game into Japanese
CNumberChannel
XML
CNumberChannel
XML
CNumberChannel
XSLOriginal
CNumberChannel
XSLOriginal
CNumberChannel
XSLJapanese
CNumberChannel
XSLJapanese
1A language selection mechanism
is required
2
XSLTProcessor
Number Guessing GameJapanese Version
The title string is saved in UP_CHANNEL table of RDBMS
4
The string “higher” is hardcoded in CNumber.java
3
uPortal I18n is Collaborative Works
1. Framework Developers
2. XSL Files Translators
3. Channel Developers
1. Things to be Done byuPortal Framework Developers
(1) UTF-8 Transparency(Usually, Latin1 Transparent)
RDBMSuPortal
XXX: UTF-8 Characters
XXX XXX
XXX XXX XXX
Properly saved 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.getBase
ActionURL()); 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
1. UTF-8 Transparency for Channel
RDBMS
XXX
XXX
???
“UTF-8 transparency” is depending on channel
uPortal2.1
???
XXXChannel
? ?
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
???
3. Things to be Done byuPortal Channel Developers
1. UTF-8 Transparency
2. Functions to select Locale from Locale[]
3. Locale Dependent Resources• XSL Files
• ResourceBundle to use locale-dependent resources in Java code
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!