18th International Unicode Conference Hong Kong, April 2001 Preference Object-based Internationalization for Distributed Application Framework in Java.

Slides:



Advertisements
Similar presentations
Amsterdam, Netherland22 November 2003FCPAE Annual Conference1 Proposal of European Chinese' Contribution to 2008 World Olympics Games Beijing, China Ling.
Advertisements

June, 2007 Petr Hamernik Extending Instant JChem 2.0 Architecture & API.
Beyond the Chrome Building Multi-Lingual and Multi-Locale Business Processes 24 th Internationalization and Unicode Conference Presented by Addison P.
Draft Java/ICU Internationalization Architecture Mark Davis.
1 Hencie Consulting Services Building a Knowledge Share System Using Oracle Designer SCOUG 2000 Conference By Murli Manickam Sameer.
Beyond Text Representation Building on Unicode to Implement a Multilingual Text Analysis Framework Thomas Hampp – IBM Germany Content Management Development.
Open-Source Approaches to Unicode Enablement Panel Discussion.
Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD.
The Determinants of Trade Union Density in Cross-Country Comparisons: Theortical Opulance and Empirical Destitution Bernd Brandl University of Vienna Department.
Allison Bloodworth, UC Berkeley Greg Hardham, CSU Lucy Appert, NYU Michelle Ziegmann, UC Berkeley 2012 Jasig Sakai Conference1.
Update on the power situation in Asia Edgar van der Meer Energy Analyst June 21, th World Chlor-Alkali Conference.
Session: Security Concerns, Issues and Setup (or the Good, the Bad and the Ugly) Panelist: Mike Neely, City of Pasadena Date: Wednesday October 3, 2001.
ExArte Walter De Meyere CONFERENCE: “Verstand op nul. Een eigengereide kijk op 40 jaar media, gelardeerd met mathematische hoogstandjes.” December 2013.
Building International Applications with Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corporation.
Unicode and Windows XP Cathy Wissink Program Manager Globalization Infrastructure, Design and Development Windows International Microsoft.
 Yaniv Feinberg Senior SDE Microsoft Corporation  Erik Fortune Principal Dev Lead Microsoft Corporation PC52.
Apache Struts Technology
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Internationalization of Java Platform Presenter: Ataru Nakazawa Advisor: Xiaoping Jia Date: January 23, 2004.
Apache Struts Technology A MVC Framework for Java Web Applications.
26 April 2001 Unicode and Windows XP, IUC 18 (Hong Kong) Unicode and Windows XP Cathy Wissink Program Manager, Globalization Windows Division Microsoft.
Sophia Antipolis, September 2006 Multilinguality, localization and internationalization Miruna Bădescu Finsiel Romania.
San José, CA – September, 2004 Localizing with XLIFF and ICU Markus Scherer Raghuram (Ram) Viswanadha IBM San.
Java Beans.
IBM Maximo Asset Management © 2007 IBM Corporation Tivoli Technical Exchange Calls Aug 31, Maximo - Multi-Language Capabilities Ritsuko Beuchert.
Sakai: Localization & Internationalization Beth Kirschner University of Michigan
Going Global: Internationalization with Java Sue Davis Rochester Java Users Group November 15, 2000.
SOFTWARE INTERNATIONALIZATION Dallas Ramsden. Internationalization GOAL Software that can run ANYWHERE in the world without having the source code changed.
119th International Unicode ConferenceSan Jose, California, September 2001 An Overview of ICU Helena Shih Chapman Doug Felt
Internationalization and the Java Stack Part 1 Matt Wheeler.
Sadegh Aliakbary. Copyright ©2014 JAVACUP.IRJAVACUP.IR All rights reserved. Redistribution of JAVACUP contents is not prohibited if JAVACUP.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Internationalization and the Java Stack Matt Wheeler.
The Company….  The Market Leader in Globalization Technology –Pioneers in visual translation environments –Solutions for major platforms & programming.
Company Confidential 1 This presentation is solely for the use of Patni personnel. No part of it may be circulated, quoted, or reproduced for distribution.
Internationalization in the Java Stack Matt Wheeler.
Chapter 14 Internationalization F Processing Date and Time –Locale –Date –TimeZone –Calendar and GregorianCalendar –DateFormat and SimpleDateFormat F Formatting.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 26 Internationalization.
Chapter 12: Internationalization Processing Date and Time Processing Date and Time  Locale  Date  TimeZone  Calendar and GregorianCalendar  DateFormat.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Building multi-lingual ASP.Net application that handle western languages and Arabic with a single code base.
DEV382 Building International Applications with the.NET Framework Christian Nagel Microsoft Regional Director Global Knowledge.
© 2007 IBM Corporation SOA on your terms and our expertise Software WebSphere Process Server and Portal Integration Overview.
Chapter 14 Internationalization F Processing Date and Time –Locale –Date –TimeZone –Calendar and GregorianCalendar –DateFormat and SimpleDateFormat F Formatting.
Developing Applications with the CSI Framework A General Guide.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
1 Chapter 20 Internationalization. 2 Objectives F To describe Java's internationalization features (§ 20.1). F To construct a locale with language, country,
BPJ444: Dates Peter Liu Tim McKenna Dates, Calendars, and what year is this? §Java tries to take an OOD approach to “when is now?” §import.
San Jose, California September 2002 What is ICU? Roadmap and Myths Helena Shih Chapman ICU Development Manager IBM Globalization Center of Competency.
Cupertino, CA, USA / September, 2000First ICU Developer Workshop1 ICU Low-level Utilities and Resource Management Vladimir Weinstein Globalization Center.
APACHE STRUTS ASHISH SINGH TOMAR ast2124. OUTLINE Introduction The Model-View-Controller Design Pattern Struts’ implementation of the MVC Pattern Additional.
Apache Struts Technology A MVC Framework for Java Web Applications.
7/23/2016 CSC 325 Advanced Programming Techniques Localization Slide #1 1 Localization Mikhail Brikman.
1 RIC 2009 Symbolic Nuclear Analysis Package - SNAP version 1.0: Features and Applications Chester Gingrich RES/DSA/CDB 3/12/09.
Random Logic l Forum.NET l Localization & Globalization Forum.NET ● May 29, 2006.
Metropolia 2013 C# programming and .NET framework
Chapter 14 Internationalization
Internationalization
Phonegap Bridge – Globalization
CS170 ygao JAVA, C7.
G11n/L10N Maturity Analysis for New Acquisitions
Reach a worldwide audience by building a world-ready app
Chapter 35 Internationalization
Windows Ribbon Framework
MULTILINGUAL USER INTERFACE
Phonegap Bridge – Globalization
Winning Global Market Opportunities
Presentation transcript:

18th International Unicode Conference Hong Kong, April 2001 Preference Object-based Internationalization for Distributed Application Framework in Java Kenya Ishimoto Yamato Software Laboratory IBM Japan, Ltd.

Hong Kong, April th International Unicode Conference2 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach Conclusion Q&A

18th International Unicode Conference Hong Kong, April 2001 Introduction

18th International Unicode Conference4 Tivoli Systems - background information an IBM company dedicated to providing products, services, and programs that enable companies of any size to manage their networked PCs and distributed systems from a single location.

Hong Kong, April th International Unicode Conference5 Tivoli Application Framework Distributed Used in the global company –multi-lingual –multi-culture Multiple-platform CORBA, XML Java UTF-8 Component-base Tivoli Console for applications to interact users

Hong Kong, April th International Unicode Conference6 Tivoli Console Example

Hong Kong, April th International Unicode Conference7 Agenda Introduction Requirements for Internationalization 1.Global multi-user support 2.Multiple locales for a single user 3.End-user Customization 4.Advanced Features Difficulties with JDK Approach Conclusion Q&A

18th International Unicode Conference Hong Kong, April 2001 Requirements for Internationalization

Hong Kong, April th International Unicode Conference9 Req.1: Global multi-user support Support multiple users simultaneously across different locales and time zones Locale = fr_FR Locale = zn_HK Locale = en_US TimeZone = Hong Kong TimeZone = Paris TimeZone = CST

Hong Kong, April th International Unicode Conference10 Req.2: Multiple locales for a single user Allow user to select different locales for resource lookup and cultural conventions Locale = fr_FR Locale = zn_HK Locale = en_US Locale = en_GB for language for cultural conventions TimeZone = Hong Kong TimeZone = Paris TimeZone = CST Tivoli provides English + 9 translated language resources JDK can support more for cultural conventions. User can select them.

Hong Kong, April th International Unicode Conference11 Req.2: Multiple locales for a single user Locale constructor Locale loc = new Locale(fr, FR); Locale loc = new Locale(el, GR); Locale loc = new Locale(fr, GR); // French (France) // Greek (Greece) // French (Greece) ? Locale(String language, String country)

Hong Kong, April th International Unicode Conference12 Req.3: End-user Customization Allow user to override a locales default attributes –e.g. date format styles and symbols The preferred non-default style should be persisted and to be used for future session, by all framework applications

Hong Kong, April th International Unicode Conference13 Req.4: Advanced features More features than the JDK –Multi-cultural calendar (Gregorian, Buddhist, Japanese, Hebrew, Islamic, Chinese) –Some other requirements are being discussed for future release. For example, transliteration, Java input method editor, etc.

Hong Kong, April th International Unicode Conference14 Agenda Introduction Requirements for Internationalization Difficulties with JDK –JDKs Internationalization API –Example Approach Conclusion Q&A

18th International Unicode Conference Hong Kong, April 2001 Difficulties with JDK

Hong Kong, April th International Unicode Conference16 JDKs Internationalization API Rich features, highly customizable Locale-sensitive classes in –java.util package –java.text package –etc. One default locale can be set

Hong Kong, April th International Unicode Conference17 Example: set default locale Locale.setDefault(aLocale); // set default locale

Hong Kong, April th International Unicode Conference18 DateFormat df = DateFormat.getDateTimeInstance(); String dateDisplay = sdf.format(aDate); Example 1: format a date // everything is based on the default locale

Hong Kong, April th International Unicode Conference19 DateFormat df = DateFormat.getDateTimeInstance(); String dateDisplay = sdf.format(aDate); Example 1: format a date // use cultLocale DateFormat df = DateFormat.getDateTimeInstance( ); String dateDisplay = sdf.format(aDate); DateFormat.DEFAULT, cultLocale

Hong Kong, April th International Unicode Conference20 DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); String dateDisplay = sdf.format(aDate); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); String dateDisplay = sdf.format(aDate); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); Example 1: format a date // use cultLocale, dateTimePattern

Hong Kong, April th International Unicode Conference21 DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); String dateDisplay = sdf.format(aDate); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); String dateDisplay = sdf.format(aDate); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); Example 1: format a date // use cultLocale, dateTimePattern, ampmStr

Hong Kong, April th International Unicode Conference22 DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); String dateDisplay = sdf.format(aDate); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); String dateDisplay = sdf.format(aDate); Example 1: format a date // use cultLocale, dateTimePattern, ampmStr, timeZoneID TimeZone tz = TimeZone.getTimeZone(timeZoneID); Calendar cal = Calendar.getInstance(tz, cultLocale); df.setCalendar(cal);

Hong Kong, April th International Unicode Conference23 ResourceBundle rb = ResourceBundle.getBundle("MessageResources); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); String msg = mf.format(new Object[] {aDate}); ResourceBundle rb = ResourceBundle.getBundle("MessageResources ); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); String msg = mf.format(new Object[] {aDate}); TimeZone tz = TimeZone.getTimeZone(timeZoneID); Calendar cal = Calendar.getInstance(tz, cultLocale); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); df.setCalendar(cal); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); ResourceBundle rb = ResourceBundle.getBundle("MessageResources", langLocale); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); mf.setLocale(cultLocale); mf.applyPattern(msgPattern); mf.setFormat(0, sdf); String msg = mf.format(new Object[] {aDate}); Example 2: format a message // everything is based on the default locale// use langLocale, cultLocale, dateTimePattern, ampmstr, timeZoneID

Hong Kong, April th International Unicode Conference24 How can we... fulfill requirements for internationalization and keep applications code simple as much as possible and keep consistent result across various applications on the framework?

Hong Kong, April th International Unicode Conference25 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Conclusion Q&A

18th International Unicode Conference Hong Kong, April 2001 Approach

18th International Unicode Conference27 Hierarchy of Internationalization APIs Application (Tivoli Products) ICU4J JDK Locale Sensitive Classes UI Lib. ICU4J: International Components for Unicode for Java

Hong Kong, April th International Unicode Conference28 Use of ICU4J International Components for Unicode for Java IBMs open source project Java classes for internationalization in Unicode –International Calendars –Unicode Normalization –Number Format Enhancements –Enhanced word-break detection –Unicode Text Searching –Unicode Text Compression –etc... ICU4J is...

Hong Kong, April th International Unicode Conference29 Hierarchy of Internationalization APIs Application (Tivoli Products) ICU4J Low-level Internationalization API JDK Locale Sensitive Classes UI Lib. ICU4J: International Components for Unicode for Java

Hong Kong, April th International Unicode Conference30 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API International Preference Object JDK/ICU4J Wrapper Other classes Rewrite Example –High-level Framework Service Conclusion Q&A

Hong Kong, April th International Unicode Conference31 International Preference Object Encapsulates users internationalization preferences –Language (Locale for resource lookup, HelpSet access, etc.) –Region (Locale for data formatting, etc.) –Calendar Type (Gregorian, Buddhist, Japanese, Islamic, Hebrew, Chinese) –Time Zone –Default override for Number format patterns and symbols –Default override for Date/Time format patterns and symbols All low-level API work with this object

Hong Kong, April th International Unicode Conference32 Setters on IntlPreferences Class setLanguageLocale setCulturalConventionLocale setTimeZone setCalendarType setDefaultDateStyle setDatePattern setDefaultTimeStyle setTimePattern setDateTimeOrder setDateTimeSeparator setAMString setPMString setNumberPattern setCurrencyPattern setPercentPattern setGroupingSeparator setDecimalSeparator setPercent setZeroDigit setMinusSign setCurrencySymbol setInternationalCurrencySymbol setMonetaryDecimalSeparator

Hong Kong, April th International Unicode Conference33 Hierarchy of Internationalization APIs Application (Tivoli Products) ICU4J Low-level Internationalization API JDK Locale Sensitive Classes UI Lib. International Preference-based API ICU4J: International Components for Unicode for Java

Hong Kong, April th International Unicode Conference34 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API International Preference Object JDK/ICU4J Wrapper Other classes Rewrite Example –High-level Framework Service Conclusion Q&A

Hong Kong, April th International Unicode Conference35 JDK/ICU4J Wrapper Extend locale-based API to the international preferences object-based API Add one layer on ICU4J to avoid side effects of possible API changes Purpose:

Hong Kong, April th International Unicode Conference36 java.utiljava.text JDK/ICU4J Wrapper Classes TimeZone SimpleTimeZone Calendar GregorianCalendar DateFormat SimpleDateFormat DateFormatSymbols NumberFormat DecimalFormat DecimalFormatSymbols MessageFormat com.ibm.utilcom.ibm.textcom.tivoli.intl TimeZone SimpleTimeZone Calendar GregorianCalendar BuddhistCalendar JapaneseCalendar HebrewCalendar IslamicCalendar ChineseCalendar DateFormat SimpleDateFormat DateFormatSymbols NumberFormat DecimalFormat DecimalFormatSymbols IntlTimeZone IntlSimpleTimeZone IntlCalendar IntlGregorianCalendar IntlBuddhistCalendar IntlJapaneseCalendar IntlHebrewCalendar IntlIslamicCalendar IntlChineseCalendar IntlDateFormat IntlSimpleDateFormat IntlDateFormatSymbols IntlNumberFormat IntlDecimalFormat IntlDecimalFormatSymbols IntlMessageFormat

Hong Kong, April th International Unicode Conference37 JDK/ICU4J Wrapper Class Example public static DateFormat getDateInstance() public static DateFormat getDateInstance(int style) public static DateFormat getDateInstance(int style, Locale locale) public static IntlDateFormat getDateInstance(IntlPreferences ip) java.text.DateFormat class (JDK) com.ibm.text.DateFormat class (ICU4J) com.tivoli.intl.IntlDateFormat class (Tivoli Wrapper) public static IntlDateFormat getDateInstance() public static IntlDateFormat getDateInstance(int style) public static IntlDateFormat getDateInstance(int style, Locale locale)

Hong Kong, April th International Unicode Conference38 com.tivoli.intl Other Classes IntlPreferences IntlUtilities IntlDisplayableText IntlBundleLoader

Hong Kong, April th International Unicode Conference39 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API International Preference Object JDK/ICU4J Wrapper Other classes Rewrite Example –High-level Framework Service Conclusion Q&A

Hong Kong, April th International Unicode Conference40 TimeZone tz = TimeZone.getTimeZone(timeZoneID); Calendar cal = Calendar.getInstance(tz, cultLocale); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); df.setCalendar(cal); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); String dateDisplay = sdf.format(aDate); Example 1: format a date // use cultLocale, dateTimePattern, ampmStr, timeZoneID

Hong Kong, April th International Unicode Conference41 TimeZone tz = TimeZone.getTimeZone(timeZoneID); Calendar cal = Calendar.getInstance(tz, cultLocale); DateFormat df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, cultLocale); df.setCalendar(cal); SimpleDateFormat sdf = (SimpleDateFormat)df; sdf.applyPattern(dateTimePattern); DateFormatSymbols dfs = sdf.getDateFormatSymbols(); dfs.setAmPmStrings(ampmStr); sdf.setDateFormatSymbols(dfs); ResourceBundle rb = ResourceBundle.getBundle("MessageResources", langLocale); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); mf.setLocale(cultLocale); mf.applyPattern(msgPattern); mf.setFormat(0, sdf); String msg = mf.format(new Object[] {aDate}); // use langLocale, cultLocale, dateTimePattern, ampmstr, timeZoneID Example 2: format a message

Hong Kong, April th International Unicode Conference42 Rewrite examples: Customization ip.setLanguageLocale(langLocale); ip.setCulturalConventionLocale(cultLocale); ip.setTimeZone(timeZoneID); ip.setAMString(ampmStr[0]); ip.setPMString(ampmStr[1]); ip.setDatePattern(datePattern, IntlPreferences.MEDIUM); ip.setTimePattern(timePattern, IntlPreferences.MEDIUM); ip.setDateTimeOrder(IntlPreferences.DATE_FIRST);... // Customizations are centralized to the International preferences ( setters can be used )

Hong Kong, April th International Unicode Conference43 Rewrite example 1: format a date IntlDateFormat df = IntlDateFormat.getDateTimeInstance(ip); String dateDisplay = df.format(aDate); // use international preferences DateFormat df = DateFormat.getDateTimeInstance(); String dateDisplay = df.format(aDate); // everything is based on the default locale

Hong Kong, April th International Unicode Conference44 Rewrite example 2: format a message ResourceBundle rb = IntlUtilities.getBundle(ip, "MessageResources"); String msgPattern = rb.getString(MessageResources.MSG0001); IntlMessageFormat mf = new IntlMessageFormat(ip, msgPattern); String msg = mf.format(new Object[] {aDate}); // use international preferences // everything is based on the default locale ResourceBundle rb = ResourceBundle.getBundle("MessageResources"); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); String msg = mf.format(new Object[] {aDate});

Hong Kong, April th International Unicode Conference45 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Layer Separation High-level Framework Service Rewrite Example International Preferences Notebook Example Conclusion Q&A

Hong Kong, April th International Unicode Conference46 Hierarchy of Internationalization APIs High-level International Service Application (Tivoli Products) ICU4J Low-level Internationalization API JDK Locale Sensitive Classes UI Lib. International Preference-based API ICU4J: International Components for Unicode for Java

Hong Kong, April th International Unicode Conference47 Layer Separation Include the framework specific implementations Correlate applications context to the users international preference Be generic for reusability Take international preference object from method argument High-level International Service Low-level Internationalization API

Hong Kong, April th International Unicode Conference48 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Layer Separation High-level Framework Service Rewrite Example International Preferences Notebook Example Conclusion Q&A

Hong Kong, April th International Unicode Conference49 High-level International Service One of the services for the framework applications Provides a set of convenience methods on top of low-level internationalization API Manages the international preferences object according to the application context The preferences object is persisted using a framework service.

Hong Kong, April th International Unicode Conference50 Hierarchy of Internationalization APIs High-level International Service Application (Tivoli Products) ICU4J Low-level Internationalization API JDK Locale Sensitive Classes preference UI Lib. International Preference-based API ICU4J: International Components for Unicode for Java

Hong Kong, April th International Unicode Conference51 Methods on International Service Resource Loading –getBundle, getString, getObject Date Formatting –formatDate, formatTime, formatDateTime, parseDate, parseTime, parseDateTime Number Formatting –formatNumber, formatCurrency, formatPercent, parseNumber, parseCurrency, parsePercent Message Formatting –formatMessage, parseMessage Collator Factory Method –getCollator BreakIterator Factory Method –getCharacterBreakIterator, getWordBreakIterator, getLineBreakIterator, getSentenceBreakIterator Case Conversion / Comparison –toLowerCase, toUpperCase, equalsIgnoreCase Late-binding Text Resolution –getDisplayText IntlPreferences Access –getIntlPreferences com.tivoli.pf.fmk.external.IFmkIntlService

Hong Kong, April th International Unicode Conference52 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Layer Separation High-level Framework Service Rewrite Example International Preferences Notebook Example Conclusion Q&A

Hong Kong, April th International Unicode Conference53 Rewrite example 1: format a date String dateDisplay = intlService.formatDate(aContext, aDate); // works according to the users international preferences DateFormat df = DateFormat.getDateTimeInstance(); String dateDisplay = df.format(aDate); // everything is based on the default locale

Hong Kong, April th International Unicode Conference54 Rewrite example 2: format a message String msg = intlService.getString(aContext, "MessageResources", MessageResources.MSG0001, new Object[] {aDate}); // works according to the users international preferences // everything is based on the default locale ResourceBundle rb = ResourceBundle.getBundle("MessageResources"); String msgPattern = rb.getString(MessageResources.MSG0001); MessageFormat mf = new MessageFormat(msgPattern); String msg = mf.format(new Object[] {aDate});

Hong Kong, April th International Unicode Conference55 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Layer Separation High-level Framework Service Rewrite Example International Preferences Notebook Example Conclusion Q&A

Hong Kong, April th International Unicode Conference56 International Preference Notebook

Hong Kong, April th International Unicode Conference57 Preference Notebook Preview Example Region:US Style:Medium Calendar:Gregorian Time Zone:CST

Hong Kong, April th International Unicode Conference58 Preference Notebook Preview Example Region:France Style:Medium Calendar:Gregorian Time Zone:Paris

Hong Kong, April th International Unicode Conference59 Preference Notebook Preview Example Region:Japan Style:Full Calendar:Japanese-era Time Zone:Tokyo

Hong Kong, April th International Unicode Conference60 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach –Use of ICU4J –Low-level Internationalization API –High-level Framework Service Layer Separation High-level Framework Service Rewrite Example International Preferences Notebook Example Conclusion Q&A

Hong Kong, April th International Unicode Conference61 Example – Message Dialog Language:English Region:US

Hong Kong, April th International Unicode Conference62 Example – Message Dialog Language:Simplified Chinese Region:US

Hong Kong, April th International Unicode Conference63 Example – Message Dialog Language:French Region:France

Hong Kong, April th International Unicode Conference64 Example – Message Dialog Language:French Region:Greece

Hong Kong, April th International Unicode Conference65 Example – Message Dialog Language:Japanese Region:Japan Calendar:Japanese

Hong Kong, April th International Unicode Conference66 Agenda Introduction Requirements for Internationalization Difficulties with JDK Approach Conclusion –For Requirements… 1.Global multi-user support 2.Multiple locales for a single user 3.End-user Customization 4.Advanced Features –Benefits Q&A

18th International Unicode Conference Hong Kong, April 2001 Conclusion

18th International Unicode Conference68 For req.1: Global multi-user support In high-level international service layer, the users locale and time zone is managed according to the application context. Each users preference settings are persistent across the network.

Hong Kong, April th International Unicode Conference69 For req.2: Multiple locales for a single user Multiple locales are encapsulated in the international preferences object. Low-level API uses appropriate locale from the preferences object.

Hong Kong, April th International Unicode Conference70 For req.3: End-user Customization Various attributes for customization encapsulated in an object. It simplifies API usage. User can alter the object through preference notebook GUI.

Hong Kong, April th International Unicode Conference71 For req.4: Advanced features Multi-cultural calendar systems are supported ICU4J is used as core internationalization API. More feature will be used in the future releases.

Hong Kong, April th International Unicode Conference72 Benefits for end-users Flexible customization Functionality for multiple-locale Consistent presentation

Hong Kong, April th International Unicode Conference73 Benefits for application developer High-level International Service can be used as a single point to provide internationalization API Various internationalization attributes are encapsulated into an object to make API usage simple International preference-based Swing widgets

18th International Unicode Conference Hong Kong, April 2001 Questions & Answers