For All Countries (Country-Independence)
As NLS support is getting more and more important, you may make your program
country-dependent (including code-page-, language- or culture-dependent),
but such country-dependency should be minimized. Otherwise, you must test
your program for each country, although most of your functions are common
to all countries. Consider the following:
- Minimize hard-coding of country- or code-page-unique
information in your program. Utilize query functions of the system, for
example, to get country-unique formats of date and time.
- When you use API's that have code page parameter(s)
such as GpiCreateLogFont, do not hard-code code page ID's but get
the required ID's from the system,
- If no appropriate system functions are available,
isolate and encapsulate country-unique information to an external file for
each country and include the country code in the file name, for example,
"A081.TBL" for Japan, whose country code is 081. Select the appropriate
file querying the current system's country code. This approach eases your
future enhancement to add supported countries. Just add new files; no modification
to your executable modules is needed.
- A worldwide product need not have the differences
in most cases and it is not recommended to do so unless there are some specific
requirements. If some functions of your product have these differences,
such functions should be tested for each DBCS language.
- Depending on your functions, you may need to support
DBCS alphanumeric character handling (such as monocasing, translation between
SBCS and DBCS alphanumeric characters). If so, note that each DBCS alphanumeric
character is at the same code points among DBCS countries' code pages in
EBCDIC DBCS but not necessarily among PC (ASCII) DBCS countries' code pages.
See also DBCS Alphanumeric Characters.
If your program becomes country-dependent, let users know what countries
your program supports. If your program does not have country-dependencies,
you can say that your program supports all the countries that OS/2 supports.
Note: When you document your supporting countries (or languages),
you should distinguish NLS support in functions from NLS translation
support since you may support NLS functions but may not provided translated
PII (or vice versa).
[Back: Run-Time Dynamic Link of DBCS OS/2 Unique Functions]
[Next: Modifying existing SBCS Products for DBCS Support]