home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / bsd / 10523 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  6.8 KB

  1. Xref: sparky comp.unix.bsd:10523 comp.os.linux:21320
  2. Path: sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!natinst.com!hrd769.brooks.af.mil!hrd769.brooks.af.mil!not-for-mail
  3. From: news@hrd769.brooks.af.mil (InterNet News)
  4. Newsgroups: comp.unix.bsd,comp.os.linux
  5. Subject: Re: Dumb Americans (was INTERNATIONALIZATION: JAPAN, FAR EAST)
  6. Date: 21 Dec 1992 17:30:44 -0600
  7. Organization: Armstrong Lab MIS, Brooks AFB TX
  8. Lines: 121
  9. Message-ID: <1h5k34INN88g@hrd769.brooks.af.mil>
  10. References: <agp22+#@rpi.edu> <1gvpt0INN8s0@hrd769.brooks.af.mil> <CARLTON.92Dec21163013@scws8.harvard.edu>
  11. NNTP-Posting-Host: hrd769.brooks.af.mil
  12.  
  13. In article <CARLTON.92Dec21163013@scws8.harvard.edu> carlton@scws8.harvard.edu (david carlton) writes:
  14. >In article <1gvpt0INN8s0@hrd769.brooks.af.mil>, news@hrd769.brooks.af.mil (InterNet News) writes:
  15. >
  16. >> So, I have a suggestion.  Change someone.  If you think
  17. >> internationalization is a snap, try it.  Get convinced that it is
  18. >> hard to retrofit, but relatively simple to design for and proceed
  19. >> from there.
  20. >
  21. >I don't believe you.  I could believe that doing it badly (well enough
  22. >to handle most European languages, say) is easy, but I think doing it
  23. >well takes a lot of work.  You have to deal with different character
  24. >sets, ways of text entry, direction of text, mixing scripts,
  25. >connection rules, and so forth; some of these are not difficult
  26. >problems, perhaps, but a lot of them are.  
  27.  
  28.   You don't believe that we did it, or that it is easier to design for
  29. ahead of time than try to retrofit it? 
  30.  
  31.   True enough.  The implementation of a small set of these is a nontrivial 
  32. set of programming units.  On the other hand, you only need to do it once.
  33. If you adopt a paradigm that says "Any narrative text in my programs will 
  34. use functions loaded at run-time for proper display" will solve your
  35. initial design problem, in that the actual decision is to wait until it
  36. is time to actually do it.
  37.  
  38.   As a made up example, let's assume we are running a program that displays
  39. the status of an assembly line.  There are three states for the line: "OK"
  40. "Plugged" and "Restarting".  A possible design decision could be to call a 
  41. routine that will display, in the proper color and orientation, that string
  42. in whatever language the client wants.  This way, you leave the stub there
  43. for each of the states, but don't actually have to implement it until you
  44. have a valid need.
  45.  
  46.   As the program units get more interactive, the processes become harder.
  47. They still only need to be written once.  If I wrote a routine that displayed
  48. an arbitrary string on the screen, it could take display space and orientation
  49. into account.  At this point, I don't really care what the characters were, 
  50. since I am leaving the final implementation to the last phase.
  51.  
  52.   We did it for internationalizing our process control software.  Each 
  53. required string was recorded in a big file (orientation wasn't a problem,
  54. but was taken into account) where each string (including it's diacriticals) 
  55. was stored according to function.  Yeah, it WAS more work, but we could do it.
  56. We had a function that used the English String Content as a hashed key into
  57. the file, and displayed the correct state, etc. on the screen based on the
  58. string required and target language.  We loaded the target language strings
  59. into memory to speed up the process.  One thing that we DIDN'T try to do was
  60. have the software try to translate anything.  We just displayed the data.
  61.   It is the same idea as using 'malloc' to create a data area, rather than
  62. a set address in memory.  It is just a matter of designed-in flexibility.
  63.  
  64. >For example, if you want to
  65. >type something in the Nagari script, hardly an uncommon script, you
  66. >will either have to have an overly complicated and artificial method
  67. >of entering text (bad - this puts unnecessary burden on the user),
  68.  
  69.   We need a Nagari input device; the 101 key keyboard is hardly the correct
  70. vehicle for this type of processing.  Is the fact that a good Nagari input
  71. device does not exist because American engineers are stupid?  I don't
  72. think so.
  73.  
  74. >read ahead in the input stream before figuring out what to put on the
  75. >screen (crummy for interactive input), or deal with the fact that what
  76. >you have put on the screen is going to change even when the user keeps
  77. >on typing without deleting (bad, because it makes the characters on
  78. >the screen jump around a lot.)  
  79.  
  80.   You are correct; it is not going to be easy the first time.  From then on, 
  81. it should be a relative snap.  Isn't that what OOP is about?  The 
  82. implementation of this type of thing will exist, once created, and reusable
  83. if it is designed for the larger concept of internationalization.
  84.  
  85. >Doing any sort of decent solution will
  86. >take a lot of extra coding, require a lot of research to figure out
  87. >what the problems are and what sort of solution people prefer, require
  88. >care not to lead to bloated programs (if you care), and is not what I
  89. >would call "relatively simple".
  90. >
  91.  
  92.   You are correct, in that trying to solve all of these problems at the
  93. same time is a gargantuan task.  Each one, however, is much simpler to
  94. solve one at a time, and will only have to be solved once.  
  95.   BTW, yes I DO care about bloated programs.  That is why an elegant, 
  96. reusable solution is the goal.  I haven't written this mythical piece of
  97. code yet, but I expect it is around the corner.
  98.  
  99.  
  100. >Perhaps I'm missing something, though - would you care to share with
  101. >us your methods for designing for internationalization?
  102. >
  103.  
  104.   Designing for internationalization is not the issue, in my opinion.  In
  105. fact, it is not in our best interest to continue the mistakes we have made 
  106. in the past.  The only design consideration for internationalization is to
  107. make a concious desicion to DO it.  Once that decision is made, then a 
  108. strategy for adoption must be formulated.  A couple of simply example are 
  109. included below:
  110.  
  111.   -  No Static Strings compiled into the kernel of your programs; make them
  112. loadable moduleis based on langauge(s) required.  The concepts of shared
  113. libraries and remote process calls both come to mind as possible methods
  114. for implementation.  
  115.   -  Use printf modules that obey more rules than "Left to Right at 10CPI"
  116. or redesign your printf to include a rules base for different languages.
  117. For example, modify it so that printf can print in any of the four primary
  118. directions (up, down, left right) and can print based on some kind of
  119. larger character set than 7 bit IBM-PC.  Those two new rules for printf
  120. could solve many of the problems we have today.
  121.  
  122.  
  123. >david carlton
  124. >carlton@husc.harvard.edu
  125. >
  126.  
  127.   If you use the two methods above as simple starting points, and design
  128. your programs to conform to a standard that says you won't  violate the
  129. method you are going to use for your internationalization.  From there,
  130. the design can proceed unimpeded.  Your implementation mileage may vary
  131. of course.
  132.  
  133. TSgt Dave Burgess
  134.