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 73: Line 73:
*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.
Experiment shows that I can alter a vb module by hand with notepad while the IDE is up.  The ide does not reflect the change until it is shut down and then restarted.  Once restarted it
uses the updated file.

Revision as of 12:30, 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.


Experiment shows that I can alter a vb module by hand with notepad while the IDE is up. The ide does not reflect the change until it is shut down and then restarted. Once restarted it uses the updated file.