Internationalisation And Globalisation

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

1 Favorite

Internationalisation And Globalisation - Presentation Transcript

  1. Internationalisation and Globalisation Visual Basic 6
  2. Alan Dean
    • alan .dean@ retailexperience .co. uk
    • or
    • adean @hotmail.com
    • ©2003
  3. Credit to Kaplan
    • “ Internationalisation with Visual Basic”
      • Michael S. Kaplan
      • ISBN 0672319772
  4. Credit to Appleman
    • “ Visual Basic Programmer’s Guide to the Win32 API”
      • Dan Appleman
      • ISBN 0672315904
  5. Outline
    • “ In a connected world, it is increasingly important to be able to implement solutions for users across the world. Unfortunately, the ability to do this with VB6 is not well documented, requires a lot of effort to understand and is not available 'out of the box'.”
    • http://www.unitoolbox.com
  6. Contents
    • The following subjects are covered:
      • Characters
      • Keyboards
      • Fonts (very briefly…)
      • Languages
      • Strings
      • Techniques to code an internationalised application
  7. Terminology
  8. Terminology – Contents
    • Globalisation
    • Internationalisation (i18N)
    • Multinationalisation (M18N)
    • Translation
    • Localisation (L10N)
  9. Internationalisation (i18N)
    • The process of converting an application to be capable of multinationalisation and localisation
    • Culture-specific issues are addressed
      • e.g. conventions, preferences, data formatting
    • Depends upon default system or user preferences
    • Does not require the translation of the text of an application
  10. Globalisation
    • The process of designing and developing an application that supports localized user interfaces and regional data for users in multiple cultures .NET Framework Developers Guide
  11. Multinationalisation (M18N)
    • The process of converting an application to support multiple cultures
    • A significant enhancement of i18N
    • Multiple language availability, including crossing the code page barrier
      • E.g. Office2000 multilanguage packs (langpacks) and Win2000 multilanguage user interface (MUI)
  12. Translation
    • The process of representing the text of an application in another language
      • e.g. dialogs, menus, alerts, documentation etc.
    • For example, the ‘File|Open’ menu item is translated to ‘Fichier|Ouvrir’ in French
      • Microsoft International Word List
    • Converts the meaning and sense of the text, not just the words
  13. Beware Babelfish!
    • “ Insert the boot disk into Drive A”
      • Translate from English to German using Babelfish
      • “ Legen Sie die Boot Diskette in Laufwerk A ein” which means
      • “ Insert the charge disk in Propulsion A”
    • “ Setzen Sie die Aufladung Scheibe in Antrieb A ein” is the correct translation
  14. Localisation (L10N)
    • The process of converting an application to adhere to the local culture of a user
  15. Terminology - Summary
    • Explained some of the general terms used around internationalisation
    • Discussed the scope of the terms used
  16. About Characters
  17. About Character - Contents
    • Character Repertoires
    • Character Codes & Encoding
    • Character Sets
      • ASCII, ANSI, DBCS, Unicode
    • Windows Character Set Usage
  18. Character (definition)
    • character noun … 7. letter or symbol : any written or printed letter, number, or other symbol … Source: Encarta World English Dictionary
  19. Character (alternate definition)
    • A character is the atomic unit of textual communication
  20. Character Repertoire
    • An abstract set of distinct characters
      • Usually defined by specifying a name and sample presentation of each character
      • The ordering of characters for sorting purposes is not defined
      • Either:
        • Fixed (e.g. English), or
        • Open (e.g. Unicode, Chinese)
  21. Character Repertoire (English)
    • The character repertoire of English contains
      • Alphabet
        • Upper case A ‘A’ … Lower case Z ‘z’
      • Punctuation
        • Period . Ellipses …
        • Comma , Semicolon ; Colon :
        • Question Mark ? Exclamation Point !
        • Quotation Marks “” Parentheses ()
        • Apostrophe ‘ Hyphen -
  22. Character Repertoires
  23. Character Code
    • A mapping between an unsigned integer and a character
      • e.g. 65=‘A’
    • The VB Functions Chr$(…) and Asc(…) address this mapping
      • e.g. Chr$(65) returns “A”
      • e.g. Asc(“A”) returns 65
  24. Character Encoding
    • The process of collating code points by assigning an unsigned integer to each character in a repertoire
    • The output of encoding is a character set
    • The values assigned imply ordering of the character set, but the ordering may not be meaningful
  25. Character Set
    • An encoded character repertoire
    • There are a large number of character sets
    • Character sets are not language specific
      • e.g. Latin Alphabet No.1 (ISO 8859-1)
  26. ASCII Character Set
  27. ANSI Character Sets
  28. Double-byte Character Sets (DBCS)
    • aka MBCS (Multi-byte character set)
      • Because first 128 characters single-byte encoded as ANSI
      • Additional characters double-byte encoded
    • Double-byte encoding
      • the first (or ‘lead’) byte signals that both itself and the next byte are to be interpreted as a single character
  29. Double-byte character
  30. DBCS Example
  31. Unicode Character Set
    • All characters as double-byte encoded (as far as Windows is concerned anyway: UCS-2/UTF-16)
    • Although DBCS and Unicode both use double-byte encoding, the mapping differs
    • All characters in the Unicode character set are given a unique value
  32. Character Set Comparison
  33. Character Repertoires Revisited
  34. Windows Character Set Usage
    • 16-bit Windows use ANSI character sets
      • Known as Code Pages
    • 32-bit Windows use Unicode
  35. Windows Code Page
    • A table of 256(+) code points for a language
      • First 128 code points are the same (the ASCII table of non-printing and English characters)
      • Next 128(+) are used for non-English characters needed by the language
    • Based on ANSI character sets
    • Windows Code Page 1252, etc.
    • http://www. microsoft .com/ globaldev /reference/ sbcs /1252. htm
  36. About Characters - Summary
    • Explained how characters are gathered into repertoires, and are then encoded into character sets
    • Described the main character sets supported by Windows
  37. About Keyboards
  38. About Keyboards - Contents
    • Scan Codes
    • Keyboard Layouts
    • Virtual Keys
  39. Scan Code
    • A hardware-dependent code sent by a keyboard to indicate a keyboard operation
    • Scan codes can vary between different keyboards
  40. Keyboard Layout
    • A definition of the scan codes supported by a keyboard
      • Win3.x have a system-wide layout
      • Win9x and WinNT support multiple layouts on a system-wide and per-thread basis
  41. Virtual Key
    • An abstraction of scan codes, so that interpretation of input need not be hardware-specific
    • API Constants exist with VK_ prefix
      • e.g. VK_A
  42. From Key to Character
  43. Keyboard limitations
    • Keyboards are an effective data entry method for most languages
    • However there are no keyboards for character-based languages because there are no keyboards with thousands of keys…
      • i.e. Far East languages (also known as Chinese/Japanese/Korean, or CJK languages)
  44. Input Method Editor (IME)
    • Software to allow the input of CJK characters
      • A group that approximates a character is selected
      • An actual character can then be selected from the group
    • Run by the Input Method Manager (IMM)
  45. Japanese IME
  46. About Keyboards - Summary
    • Explained how keystrokes become characters
    • Briefly discussed non-keyboard input
  47. About Fonts
  48. About Fonts - Contents
    • Character-based systems
    • Graphic-based systems
    • Glyphs & Fonts
  49. Character-based Systems
    • Such systems display characters only
  50. Graphic-based Systems
    • Such systems display glyphs, not characters
  51. Glyph
    • A glyph is a graphical representation of a character
  52. Font
    • A collection of glyphs
  53. About Fonts - Summary
    • Discussed the difference between character-based and graphic-based systems
    • Briefly discussed the representation of characters by glyphs and fonts
  54. About Languages
  55. About Languages - Contents
    • Languages
    • Locales
  56. Language (definition)
    • language noun 1. speech of group : the speech of a country, region, or group of people, including its diction, syntax, and grammar … Source: Encarta World English Dictionary
  57. Locale
    • A specific international market where a target user is working
    • Encompasses localisation issues:
      • e.g. conventions, culture, language, preferences
      • including formatting of numbers, currencies, etc.
      • phraseology can vary also
  58. Locale Identifier (LCID)
    • A 32-bit unsigned integer that identifies the locale for the system or thread
    • Commonly pronounced el-sid
  59. LCID Structure
  60. LCID Language
    • Language Identifier
      • A combination of the primary and secondary language identifiers
    • Primary Language Identifier
      • Represents the language itself
      • (e.g. ‘English’)
    • Secondary Language Identifier
      • Represents the country or region where the language is spoken
      • (e.g. ‘English as spoken in the United Kingdom’)
  61. LCID Sorting
    • Sort Identifier
      • Represents the order in which characters are to be sorted (usually the default)
    • Sort Version
      • Currently unused (it is reserved and must be set to 0)
  62. Locale Coverage
    • Windows does not have locales for all possible language / region combinations
      • In fact, almost without exception, a locale is only supported if there is a country or region that speaks the language
      • For example there is no locale for Esperanto, Coptic or Latin and certainly not for Klingon!
  63. Locale Usage
    • Settings associated with Locales are heavily used by Windows, COM and VB
      • So, the current Locale fundamentally affects the processing of information on a system
    • Settings are accessed by the Regional Options control panel
  64. About Languages - Summary
    • Discussed the relationship between languages and locales
    • Explained the structure of the locale identifier
  65. About Strings
  66. About Strings - Contents
    • C Strings
    • VB Strings
    • VB String calls to COM and Win32 API functions
  67. String
    • An array of characters
    • Not a primitive datatype
    • A number of string datatypes exist
      • e.g. LPSTR, BSTR, etc.
  68. Pointer to String (LPSTR)
    • C datatype
    • Null-terminated
    • Used extensively throughout the Windows API
  69. Basic String (BSTR)
    • COM datatype, used by VB internally
    • Unicode pointer to a block of memory prefixed by a length encoding representing the size of the string
      • A contract for creation (allocation)
      • A contract for destruction (deallocation)
      • An API
  70. VB COM Calls
    • Both VB and COM use Unicode, so strings are not transposed into alternate character sets
  71. VB Win32 API Calls
    • Character encoding
      • VB and WinNT use Unicode encoding, but
      • Win9x uses ANSI encoding
    • Unfortunately VB does not know the encoding expected on the target API call
      • Strings are therefore encoded as ANSI
      • Thus the call succeeds both on Win9x and WinNT, but this wasteful on WinNT…
  72. VB Win9x API Call
  73. VB WinNT API Call
  74. VB WinNT API Call (Unicode)
  75. About Strings - Summary
    • Discussed C and VB strings
    • Explained how COM and Win32 API string function calls are transacted
  76. An Internationalised App
  77. 1.0.1
    • ‘ Plain vanilla’ VB Standard EXE
  78. 2.0.2
    • 1 st attempt to internationalise
      • Addition of resource file
  79. 2.1.2
    • 2 nd attempt to internationalise
      • Isolate persistent strings
  80. 2.2.2
    • 3 rd attempt to internationalise
      • Parameterise resource strings
  81. 2.2.3
    • 4 th attempt to internationalise
      • Loading with current LCID
      • By setting thread locale
  82. 3.0.4
    • 5 th attempt to internationalise
      • Loading with current LCID (again…)
      • By loading resources directly
  83. 3.1.5
    • 6 th attempt to internationalise
      • Loading with current LCID (yet again!)
      • By employing satellite resource
  84. 3.1.6
    • 5 th attempt to internationalise
      • Loading all strings from satellite resources
  85. Conclusion
    • Covered Characters, Keyboards, Fonts, and Languages
    • Explained Strings and the usage of Strings
    • Coded a simple internationalised application
  86. Thank You
    • alan .dean@ retailexperience .co. uk
    • or
    • adean @hotmail.com
    • ©2003

+ Alan DeanAlan Dean, 2 years ago

custom

2979 views, 1 favs, 0 embeds more stats

This is a very old presentation but if you gloss ov more

More Info

© All Rights Reserved

Go to text version
  • Total Views 2979
    • 2979 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 1
  • Downloads 87
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as innappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

Categories