Mastering PowerBuilder

HomePrevious Lesson: Course 3:: Session 27 :: Page 100
Next Lesson: Course 3:: Session 27 :: Page 120
Application Setup

Translation Assistant uses the following custom class user objects from 'internat.pbl'. So, you need to add 'internat.pbl' to the application's library search path.

  • uo_International ( Language Manager )
  • uo_MessageManager ( Message Manager )

You need to declare few global variables as shown below:

uo_International guo_Language_Manager
uo_MessageManager	guo_Message_Manager
w_frame	gw_frame
String ls_INIFile, ls_INIFileLong
ls_INIFileLong = ".\product.ini"
ls_INIFile = "product.ini"

Once you declare the global variables, write the following code in the application's Open event:

// Create an instance of the language manager.
guo_Language_Manager = CREATE uo_International
// Setup current language and languages
guo_Language_Manager.InstallINIFile( ls_INIFileLong )
// Create Message Manager
guo_Language_Manager.InstallMessageManager( &
	guo_Message_Manager )
// Define Message File.
// The following is specifying the message file.
guo_Message_Manager.InstallMessageFile( ls_INIFile )
// To use message database, call InstallMessageTable()
// To use message DataWindow, call InstallMessageDW()
HomePrevious Lesson: Course 3:: Session 27 :: Page 100
Next Lesson: Course 3:: Session 27 :: Page 120