Multi-Language-Interface-design-approach: Difference between revisions

From *** My Personal Wiki ***
Jump to navigation Jump to search
Embeddedrf (talk | contribs)
Embeddedrf (talk | contribs)
Line 69: Line 69:
'''Method #1'''
'''Method #1'''


*Can use *.frm file parsing to generate a list of objects to be altered > Open the *.frm file and parse
*Use *.frm file parsing to generate a list of objects to be altered > Open the *.frm file and parse
*Also generate list of ENGLISH phrases used in program with this tool > grab all the .caption =, .text= , .label= from the program text
*Initialization Module: Stuff into a VB file that is already added to the project
*Initialization Module: Stuff into a VB file that is already added to the project
*at FORM_LOAD run the Initialization Module to translate and set the property == translated version.
*at FORM_LOAD run the Initialization Module to translate and set the property == translated version.

Revision as of 12:11, 24 October 2009

Multiple Language Interface - The database approach

  • Make list of Menu Items from a list in a database so they can be added dynamically
  • MUST: Include code to create database file > because each language will be a database file of its own


Language Menus

  • ADD NEW WORD
  • ADD NEW LANGUAGE
  • SELECT LANGUAGE
    • ENGLISH
    • POLISH
    • ....

Pages

  • add a menu in the upper bar for LANGUAGE
  • ADD A LANGUAGE: PopUp a small window to enter a new language name
    • adds language name to the language database
    • creates a new database table for that language
  • ADD TRANSLATIONS: Data Base full language display & entry > works with language tables
    • 1st column = english KeyWord
    • 2nd column = *ADDED LANGUAGE*
    • behavior - highlight the untranslated column rows?
    • limit length of translation

Functional Examples

Example #1

  • Header1=deg '-- set the header of a column on the temperature profile sheet to 'deg'...short for degrees

Change to:

  • Header1= Translate(deg)

Translate will be a function that queries a database for a foreign language entry: Language='POLISH' Word='deg'


Example #2

Display function can be used to intercept all UserPrompt text messages > Translate(Message)


Features

  • Design of language interface should learn. The user should be the source of the translation! Should accumulate source language=English AND other languages inputed
  • Must have a language database interface that allows a user to input his language. Even allow an english respin on my terminology.
  • must save off language selection to disk config file


What needs to be translated?

  • Form.captions should be translated
  • TextBox.text: user prompts
  • labels.captions
  • FlexGrid: profile sheet headers
  • ToolTipText
  • Menu Captions
  • Button.Captions

Methods

Method #1

  • Use *.frm file parsing to generate a list of objects to be altered > Open the *.frm file and parse
  • Also generate list of ENGLISH phrases used in program with this tool > grab all the .caption =, .text= , .label= from the program text
  • Initialization Module: Stuff into a VB file that is already added to the project
  • at FORM_LOAD run the Initialization Module to translate and set the property == translated version.


Method #2

  • At form_load must run thru the list of properties that must be updated to the current language setting - when a new item is added to program it must be added to this list
  • Use *.frm file parsing to generate a list of objects that need to be altered to : xlate("english phrase")
  • Use search function to track down all references to these objects and alter to the xlate("english phrase")