Mike Wahler wrote:
"Gianni Mariani" <gi*******@mariani.ws> wrote in message
....So, the real question is. What kind of issues are you dealing with that >
require internationalization ?
None at the moment. But I want to prepare myself for
when I do need to deal with internationalized software.
You know, planning ahead.
So if you're interested in some general internationalization (i18n from
now on) knowledge, this is a summary for you. I have only looked
briefly at the C++ i18n support a long time ago (pre standard) and it
was woefully short - I have not looked at it as it stands now. But then
again, it is taylored to issues specific with command line applications.
Products that require i18n support are usually far more complex.
Here is a list of i18n issues/no particular order:
a) Character sets.
- ascii compatible codepages (EUC*, utf-8 etc)
- ascii INcompatible codepages (SJIS, BIG5, ISO2022)
- conversion between codepages
- incompatible codepages
- code-set detection
- normalized forms (most composed form, most decomposed form)
b) User messages (message catalogues)
- language format issues
- pluralization of a message
e.g. "1 packet received" vs "2 packets received";
c) Locale specific processing
- time zones
- time display format
- dates of significance (New Year, Chinese New Year)
- numerical display format
- string collation
- spell checking
- tax rules
- accounting rules
- legal issues (privacy - limitations on DB)
- encryption limitations
- language and location
- Spanish as spoken in the USA
- French as spoken in Canada
- Multiple versions of "Spanish" in Spain
- Basque, Catalan or Galician
- telephone formats
- address formats
- building codes
d) Multi-lingual issues
- collation ?
- spell checking
e) Bidirectional issues
f) Composed characters (Thai, Vietnamese)
g) Keyboards
- keyboard layouts
- input methods (phonetic to symbolic transformation)
- multi-lingual input
h) Displaying characters
- fonts
- mixing fonts to display text
- bidirectional text
- vertical text
- select a region of text
- display a region of selected text
- select a word
i) National borders
- recognition of state (e.g. PRC,ROC)
j) Graphics
- icons
- cultutally sensitive issues
- images with embedded text
- images with faces showing - Women with hair showing.
- culturally unacceptable images
- Product names that have culturally offensive meaning
k) Colors
- colors that are "offensive"
- colors that show alarm - RED indicates failure
+++ lots more.
Most applications never deal with some of the issues above.
It is interesting to note that many of these issues mesh with other
features the application. For example, product description and product
location and cell phones - " press the 'Send' key ". It is critical to
NEVER EVER write code that goes like
if ( product.location == SPAIN )
{
if ( prodict.language == BASQUE )
{
// basque menu unavailable use english
Menu = menu.feautues("SPAIN").language("EN");
...
Optimal/best in class practice for I18N is somthing like:
CONTEXT.location = SPAIN;
CONTEXT.language = BASQUE;
CONTEXT.product = MODEL755_CELL_PHONE;
CONTEXT.display = NTSC_SIZE;
... // whatever attributes change the product behaviour
...
Menu = FetchFromDB( MENU, CONTEXT );
...
Response = FetchFromDB( RESPONSE, CONTEXT );
// Menu suitable for this context is now in Menu.
The routine FetchFromDB performs a search in a database/dictionary of
menus for this product in the current context. The rules for choosing
the correct item are *also* stored in the database. The object returned
may be more complex, for example, it may be a set of TAX rules for a
financial application.
In general, anyone doing anything regarding serious i18n support does
not use the ones provided by the OS because it is usually inadequate and
the standards process is basically too slow to change. Not only that,
the "standard" model used to "i18nize" does not lend itself well to very
complex applications which is more and more the case today.
A case in point, Internet Explorer does not use the OS provided langauge
support, the developers needed somthing far richer and developed MLang:
http://msdn.microsoft.com/workshop/misc/mlang/mlang.asp
I have found that it is far easier to i18nize an application that has no
support for i18n that to unwind some broken i18n support.
I can rant forever on this topic. As you can see, it's not somthing you
can learn from a few posts on comp.lang.c++.