★ wanayoo — archive 1999 http://ibm.com/java/education/international-unicode/unicode1.htmlNouvelle recherche | Portail wanayoo

Introduction to
IBM Classes for Unicode

Making your Java/C++/C Applications Global

IBM Center for Java Technology, SV

1.0 Introduction
2.0 Converting your Application
2.1 Software Globalization in Java vs. C/C++
2.2 Translate Strings
2.3 Remove Concatenation
2.4 Handle Numbers, Currencies, Dates and Times
2.5 Fix String Comparison
2.6 Use Character Properties
2.7 Extend Word-Break Detection
2.8 Convert Non-Unicode Text
2.9 Handle Multilingual Text
3.0 Conclusion
Appendix A: Differences between Java and C++ API 
Appendix B: Relationship between C++ and C API 
Appendix C: The C/C++ Resource Bundle Text Format
Appendix D: Character Set IDs
Appendix E: Locales
Appendix F: Unicode Character Types

1.0 Introduction

The emergence of the Internet and other distributed networks puts increasing importance on the ability to create global software--that is, software that can be developed independently of the countries or languages of intended users--and then translated for multiple countries or regions. IBM's International Classes for Unicode (ICU) C/C++ libraries and the set of classes IBM contributed to recent JDK releases make major steps forward in creating global applications. Both provide frameworks based on the Unicode ä 2.0 character set--the standard for international text--and they provide an architecture for developing global applications, which can present messages, numbers, collation, word break, dates, and currency in any country's conventional formats.

However, when all is said and done, it may not be clear just how to go about making your program ready for localization by using the ICU. Our goal is to outline the procedure to accomplish just that for programs written in C, C++ and Java. The discussion also applies to new programs; it is generally much easier to build a global program from the ground, than to go back later and retrofit it.

The bulk of the international support in recent JDKs was provided by the Text and International group at Taligent (now part of the IBM Center for Java Technology), with data supplied by IBM's National Language Technical Center (NLTC) in Toronto. At Taligent, the group developed an integrated set of object-oriented frameworks to support the creation of international software, providing a standard API to make handling the requirements of different countries and languages transparent to developers. Benefiting from the experience of designing and implementing these frameworks, the group redesigned them for Java. The very design of the Java language allowed for a simpler API and implementation. This was a cooperative effort with JavaSoft, which participated in reviewing and adapting the APIs the group supplied. This code was then ported back to C++ and C to provide a parallel architecture and API for portable applications.

Before diving into the text, we will clarify some notation that we will be using:

Display string

A string that may be shown to the user. These strings will need to be translated for different countries. Non-display strings, such as URLs, are used programmatically, and are not translated.

Locale

A name for conventions shared among a large set of users for language, dates, times, numbers, etc. Typically, a single ID represents a single country. However, some countries, such as Switzerland, have more than one official language and therefore multiple locales.

Global application

Also known as an internationalized application, is an application that can be completely translated for use in different locales. All text shown to the user is in the native language, and user expectations are met for dates, times, and other locale conventions. Also known as localizable application. To globalize or internationalize, is to convert your program into a localizable one. Of course, with Java, you can also have global applets.

Some use the abbreviations "i18n" and "l10n" for "internationalization" and "localization"; however, these are needlessly "o5e" (obscure).

The JDK 1.1 release implements the Unicode 2.0 character set with the Unicode character database version 2.0.14; for brevity, we will refer to this as Unicode 2.0.14.

Note: Unless otherwise noted, our use of the term application should be understood to include applets.





JavaTM is a trademark of Sun Microsystems, Inc.

Microsoft is a registered trademark of Microsoft Corporation.

Other companies, products, and service names may be trademarks or service marks of others.

Copyright    Trademark



IBM HomeOrderEmployment