Sunteți pe pagina 1din 34

BluePhoenix AppBuilder 2.1.

Multi-Language User Interface Guide

BluePhoenix AppBuilder 2.1.0 Multi-Language User Interface Guide April, 2003 Corporate Headquarters BluePhoenix Solutions Vlierwerf 7B 4704 SB Roosendaal The Netherlands +31 (0) 165 399 401 +31 (0) 165 396 308 fax USA Headquarters BluePhoenix Solutions USA, Inc. 8000 Regency Parkway Cary, NC 27511 United States +1 919.380.5100 +1 919.380.5111 fax www.bluephoenixsolutions.com

1992-2003 BluePhoenix Solutions All rights reserved. BluePhoenix is a trademark of BluePhoenix Solutions. All other product and company names mentioned herein are for identification purposes only and are the property of, and may be trademarks of, their respective owners. Portions of this product may be covered by U.S. Patent Numbers 5,495,222 and 5,495,610 and various other non-U.S. patents. The software supplied with this document is the property of BluePhoenix Solutions, and is furnished under a license agreement. Neither the software nor this document may be copied or transferred by any means, electronic or mechanical, except as provided in the licensing agreement. BluePhoenix Solutions has made every effort to ensure that the information contained in this document is accurate; however, there are no representations or warranties regarding this information, including warranties of merchantability or fitness for a particular purpose. BluePhoenix Solutions assumes no responsibility for errors or omissions that may occur in this document. The information in this document is subject to change without prior notice and does not represent a commitment by BluePhoenix Solutions or its representatives.

TABLE OF CONTENTS

Table of Contents

Product Name Version Document Title

1 Introduction to MLUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Overview of MLUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1 Limitations of MLUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

2 Developing Multi-Language User Interface Applications

. . . . . . . . 2-1

Understanding MLUI options in Construction Workbench. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 Construction Workbench MLUI design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 MLUI Workbench Options settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 Construction Workbench menu behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Converting existing applications to MLUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3 Understanding the Default Language setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Understanding the Current Language setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Developing new MLUI applications with AppBuilder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Understanding the Default Language setting in new applications . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Using the Current Language setting in new applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Understanding migration issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Populating the workgroup repository first . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5 Understanding language panel synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 Migration to pre-MLUI AppBuilder repositories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Repository objects with MLUI capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7 Window objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8 Set Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9 HTML Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10 Simulating the Window Flow Diagram in an MLUI environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Understanding MLUI application preparation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Impact of MLUI on the application development cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Code Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11 Client Runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12 Rebuild Facility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12

3 Installing MLUI Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1 4 Using Construction Workbench to Develop an MLUI Application
Working with language objects in the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Defining the Default Language in the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 Defining a new language in the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2 Modifying a language object in the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Deleting a language object in the repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Setting the Workbench Options for MLUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3 Creating windows for different languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4 Editing attributes for a specific language panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5 Understanding the Language menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-7 Deleting a language panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Viewing a specific language panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Synchronizing language panels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-8 Creating sets in different languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9

A Language Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


i

ii

CHAPTER

INTRODUCTION TO MLUI

AppBuilder 2.1.0 Multi-Language User Interface Guide

AppBuilder 2.1.0 Multi-Language User Interface Guide AppBuilder 2.1.0 Multi-Language User Interface Guide

The purpose of this manual is to define the concepts and describe the functionality provided by the new Multi-Language User Interface (MLUI) feature introduced in AppBuilder 2.1.0. By using this manual, you will learn how to use the extensions of the AppBuilder tools to build multiple user interfaces for one application. This manual does not address the problem of merging existing language-specific applications already developed in AppBuilder. With MLUI, you can develop applications with language dependent user interfaces that can be targeted to different language environments within one language group. A language group is a set of languages that are based on the same codepage. This introductory chapter covers information on the following topics: Overview of MLUI Limitations of MLUI

Overview of MLUI
Multiple Language Support (MLS) is the ability to develop an application for more than one language. The Appbuilder MLUI functionality offers MLS capability by giving you the power to develop more than one language-dependent user interface for a single application. With MLUI functionality in AppBuilder, the user can create applications that have user interfaces customized for different languages, preparing them one at a time. The MLUI functionality also gives the user the ability to convert an existing application into an MLS application, building a multi-language user interface from the existing base language.

AppBuilder 2.1.0 Multi-Language User Interface Guide

1-1

Limitations of MLUI

The following AppBuilder products are enabled for MLUI: Window Painter Set Builder Turbocycler Window Flow Diagrammer HTML Generator

Limitations of MLUI
MLUI is limited to developing applications within a specific language group. A language group is a set of languages that are based on the same codepage. For a list of possible codepages and the languages that comprise them, see Appendix A, Language Groups.

1-2

Introduction to MLUI

CHAPTER

DEVELOPING MULTI-LANGUAGE USER INTERFACE APPLICATIONS

AppBuilder 2.1.0 Multi-Language User Interface Guide

This section is a discussion of concepts to consider and understand before developing a languagedependent application. The following topics are discussed in this section: Understanding MLUI options in Construction Workbench Converting existing applications to MLUI Developing new MLUI applications with AppBuilder Understanding migration issues Repository objects with MLUI capability HTML Generation Simulating the Window Flow Diagram in an MLUI environment Understanding MLUI application preparation

Understanding MLUI options in Construction Workbench


This section discusses where you can find the Multi-Language User Interface (MLUI) options within the Construction Workbench. The following topics are discussed in this section: Construction Workbench MLUI design MLUI Workbench Options settings Construction Workbench menu behavior

Construction Workbench MLUI design


In an MLUI environment, you must create a set of required languages using the MLUI Language Editor. The Construction Workbench doesnt begin to function in MLUI mode until at least one language is created in the repository. In a non-MLUI mode, all language related options are invisible. Workbench Options, Window Painter, and Set Builder appear as they do in a single-language environment.

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-1

Understanding MLUI options in Construction Workbench

MLUI Workbench Options settings


There are MLUI options on the General tab of the Workbench Options window. Before you can set these options you must populate the repository with language objects and define the Default Language for the application. Refer to Working with language objects in the repository for step-by-step instructions on populating the repository. To access the Workbench Options window, from the Construction Workbench, click Tools > Workbench Options > General.
Figure 2-1 Workbench Options window

MLUI Settings

2-2

Developing Multi-Language User Interface Applications

Converting existing applications to MLUI

Table 2-1 Option

MLUI Workbench Options settings Description Set the Current Language option from here to specify the language of preparation and to dictate that windows or sets automatically open in this language. This makes developing an application for one language at a time easier. You do not have to specify the Current Language every time you open a new window or set. Before you can define your Current Language, you must have created language objects in the repository. Although, this option is used when you want to develop large parts of an application one language at a time, AppBuilder gives you the flexibility to develop a window or set in multiple languages before moving to the next window or set. Used when converting an existing application to an MLUI application, the Default Language is the language of your existing application. You must define the Default Language in the repository using the Language Editor. See Defining the Default Language in the repository. Once the Default Language is defined, it is displayed here.

Current Language

Default Language

Construction Workbench menu behavior


AppBuilder in MLUI-mode creates additional menus based on the languages already define in the repository. When you create a language in the repository, AppBuilder automatically creates a menu option for that language. Dynamic menu options make it easy for you to differentiate between the languages that are stored in the repository and the languages in which you have created your panels, and it makes it easy for you to toggle between different language panels for a specific window or set. Once you define the language objects that you will be using in the repository, AppBuilder displays those languages in the MLUI menus. This makes switching between languages fast and easy.

Note

The MLUI menus can display up to 10 languages. To work with additional languages, select the menu option Languages... With a language panel active, click Edit > Show Language Panel > Languages... The Select Language window displays listing all the languages you have available for that option.

Converting existing applications to MLUI


You can convert existing applications to multi-language applications. AppBuilder marks your pre-MLUI application object as a base object at the point when you create new MLUI window panels or set display values for that object. AppBuilder provides a Default Language setting and a Current Language setting to allow you to differentiate between the language of your existing application and the language of your new MLUI application. The Default Language is intended for your base objects. The Current Language is a specific Workbench Options setting that makes it easier for you to develop your new MLUI application. The following topics are discussed in this section: Understanding the Default Language setting Understanding the Current Language setting

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-3

Converting existing applications to MLUI

Understanding the Default Language setting


When you are creating an MLUI application from an existing AppBuilder application, specify the Default Language as the language of your existing application. Your Default Language can also be considered the language of your base objects. When you begin creating language panels and set display values for an existing application, the original window or set objects are marked as the base objects. For MLUI development, the base objects (windows and sets) are the initial source of the newly created language panels and display values. The base window or set objects refer to one of the following: The first window or set created in AppBuilder MLUI. For windows and sets initially created in a pre-MLUI AppBuilder, the existing windows and sets are marked as the base objects when a second language is added to that base window or set.

Note

The Default Language setting on the Workbench Options window is for converting existing applications to MLUI applications. When you are creating a new MLUI application, the Default Language setting on the Workbench Options window is irrelevant, and for that reason, it is greyed out. For new MLUI applications, the language of the initial window is considered the Default Language.

The Default Language is a repository-wide setting. In a group repository, the Default Language setting is shared by all users. With the use of base objects, you can test your MLUI development before you complete the entire application in the Current Language. Although the Current Language is the language of preparation, if you have yet to develop all window panels or set display values in the Current Language, the Default Language is used where a Current Language panel does not exist. Refer to Understanding MLUI application preparation. When developing a new MLUI application from scratch, it is not necessary to specify a Default Language. The first objects that are created in the repository automatically become your base objects and their language is considered the Default Language; therefore, if the application is completely developed in the first language, the user can test subsequent languages using the Default Language design.

Understanding the Current Language setting


Note
Before you can set a Current Language, you must define the language objects in the repository. Refer to Working with language objects in the repository for information on creating the language objects in the repository.

The Current Language is a Workbench Options setting whose purpose is two-fold: Your MLUI application is prepared using the Current Language setting, if language panels or display values do not exists for the Current Language, the Default Language is used at preparation. AppBuilder opens each new window panel or set display value in the Current Language, allowing you to easily develop large portions of your application for one language without having to specify the language each time you open a new window or set. The Current Language is a local setting. Each workbench can have its own setting. To define your Current Language in the Workbench Options window, from the Construction Workbench, click Tools > Workbench Options > General. If the Current Language is set to Not Defined the base objects are used when editing windows or sets.

2-4

Developing Multi-Language User Interface Applications

Developing new MLUI applications with AppBuilder

Developing new MLUI applications with AppBuilder


The biggest difference between developing a new AppBuilder MLUI application and converting an existing AppBuilder application to an MLUI application is the use of the Default Language setting. You must specify a Default Language when converting a non-MLUI application to an MLUI application. But, when creating a new MLUI application, the first language you develop in automatically becomes the Default Language. You do not have to take any specific action.

Understanding the Default Language setting in new applications


When developing a new MLUI application with AppBuilder, it is not necessary to specify a Default Language. The first language that you develop the application in automatically becomes the Default Language; therefore, if the application is completely developed in the first language, the user can test subsequent languages using the Default Language design. Refer to Understanding the Default Language setting for more information.

Using the Current Language setting in new applications


The way that you use the Current Language setting does not change regardless of whether you are developing a new MLUI application or converting an existing AppBuilder application for multiple languages. The Current Language is the language of preparation and the language in which your new MLUI panels will automatically open. Refer to Understanding the Current Language setting for more information.

Understanding migration issues


When developers are working on separate pieces of an application in separate personal repositories, at one point, they must synchronize their work with the work of others. There are three distinct migration issues that you must be aware of before you can successfully develop an MLUI application. This section discusses the following topics: Populating the workgroup repository first Understanding language panel synchronization Migration to pre-MLUI AppBuilder repositories

Populating the workgroup repository first


Your first step in working with AppBuilder MLUI is to create language objects in the repository. The internal system IDs of the language objects are unique for each repository. The unique IDs are preserved when the objects are migrated to other repositories. If a language object with the name SPANISH is

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-5

Understanding migration issues

created in two different Personal repositories, it will have two different system IDs. The windows or sets using these two different language objects for SPANISH can not be merged without losing information. For this reason, if the same application is developed in two different Personal repositories and merged in a Workgroup repository, the language objects must be created in the group repository first. These language objects can be migrated to the personal repositories ensuring that the same system IDs are in each personal repository. Then, when the windows and sets using these language objects are merged, no information is lost. The practice of populating the group repository with objects and then migrating those objects down to the various personal repositories is not a new concept in AppBuilder development. It is just that when you have many developers developing applications in the same language, the chance of creating language objects with conflicting system IDs is possible; therefore, it is worthwhile to mention the practice of populating the group repository first here. For detailed information about migrating objects from a group repository to your local repository, refer to one of the following guides: If you are using the Enterprise Repository tool, refer to the Enterprise Migration Guide. If you are using the Freeway Repository tool, refer to the Workgroup Repository Guide. Follow these steps to migrate from an Enterprise Repository to a personal repository: 1. 2. 3. Create a function called LANGUAGE_FUNCTION. Attach the language objects you created to the Function. Download the LANGUAGE_FUNCTION with Full hierarchy scope.

Understanding language panel synchronization


In an MLUI environment, all the language panels of a given window are automatically synchronized. When a GUI control is added to any one of the language panels, it is automatically added to other language panels for the same window. The same is true for deleting controls. Modifications to generic properties of the GUI controls are also propagated to all language panels automatically. Refer to Attributes for a discussion on the difference of generic and visual attributes. In most cases, AppBuilder keeps all the language panels synchronized throughout the changes you make to individual language panels. There are situations, however, where the language panels can get out of sync: If each language panel has different user authority, propagation of updates between language panels will fail. The failure is reported in an error message, but in spite of the error message, if the changed objects are committed, the language panels could end up being different. If the language panels were created in two different repositories using a pre-MLUI version of AppBuilder, and the panels are merged into one repository using the AppBuilder TurboScripter. The HPSIDs within the language panels may be different because they came from different sources. Because it is required that all language variants match the base window, AppBuilders MLUI functionality provides a synchronization option to ensure that the base windows and the language variant panels match. Use the synchronization option when you encounter the special cases listed above. With a language set display or window panel active, click Edit > Language > Synchronize Language Panels. The synchronization tool considers the HPSIDs for each window control, comparing the

2-6

Developing Multi-Language User Interface Applications

Repository objects with MLUI capability

HPSIDs on the base window to those on the corresponding language variant panels. Synchronization then adds or deletes controls from the language panel variants as necessary to ensure that they match the HPSIDs for the controls on the base window.

Verifying synchronization before you synchronize


The result of synchronization may have un-intended consequences. The base panel is used as a reference point; it is considered to be in the correct state. All other language panels are modified to match the contents of the base panel; therefore, synchronizing window panels will change the display of your language panels. After synchronization, all language panels will have the same HPSIDs as the base window. AppBuilder gives you the opportunity to verify whether you need to synchronize your language panels before you run Synchronize. The Verify Synchronization option does not tell you exactly which controls will be added or deleted during synchronization, but it will tell you if you have conflicting HPSIDs in your window panels. With that information, you can further investigate which window controls do not match.
Figure 2-2 Sample Verify Synchronization Report

Migration to pre-MLUI AppBuilder repositories


The AppBuilder repository model has been modified to support MLUI functionality. These model changes are available in repositories released in AppBuilder 2.1.0 and later. The MLUI applications can be migrated to another AppBuilder 2.1.0 or later versions of repositories without losing any data. However, AppBuilder does not support migration of MLUI applications to repositories that were created before AppBuilder 2.1.0.

Repository objects with MLUI capability


Both Window Painter and Set Builder are supported for MLUI. Using these tools, first create a window or set object in your base language and then create subsequent window panels or set display values in each language from that base. The newly created window or set has all the contents filled-in from the base object. Once created, the language variants are separate window panels or sets whose visual attributes can be modified independently of the default, base object.

Note

Once a window control is added or deleted, the change is reflected in all the window panels, regardless of which panel the change occurred in.

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-7

Repository objects with MLUI capability

Window objects
A window consists of panels, controls, and attributes. This section discusses how each item is handled in an MLUI environment. Panels The contents of a window are stored as panels in the repository, one panel per language. One of these panels is marked as the base panel. The base panel is used whenever the requested language panel does not exist. Controls GUI Controls are the objects within the panels. For example, fields, push buttons, and list boxes. All language panels for any given window are automatically updated if GUI controls are added or deleted from any one of the panels; however, you can manipulate what is displayed on each panel by using the Visible attribute. See Avoiding the global add and delete for more information about using the Visible attribute. Attributes There are two types of attributes for GUI controls: generic attributes and visual attributes. The visual attributes are those attributes that affect what the user can see on your GUI. Some examples of visual attributes are Text, Size, Color, and Visible. Dont confuse Visible and visual. Visible is an attribute of type visual. Attributes of type visual can be altered for MLUI capability. The visual attributes are specific to each language panel; any change in a visual attribute on a language panel affects only that language panel. The generic attributes, are those attributes that control object behavior under the covers of the user interface. Some examples of a generic attribute are Editable, Enable, and Mandatory. Generic attributes remain unaffected by the language selection. When a generic attribute is updated in one language panel, it is automatically updated in all other language panels.

Note

Deleting a language object from the repository can result in lost data for MLUI panels that use that language. It is important that you do not carelessly delete language objects from an MLUI repository.

2-8

Developing Multi-Language User Interface Applications

Repository objects with MLUI capability

Figure 2-3

The hierarchy of repository objects associated with a window in an MLUI environment

CUSTOMER_INFO_WINDOW (WINDOW) (PANEL) Base

ENGLISH (LANGUAGE) Default Language FRENCH (LANGUAGE)

(PANEL)

(PANEL)

SPANISH (LANGUAGE)

Avoiding the global add and delete


When you add or delete a window control from one language panel, it is globally added or deleted from all language panels for that window. In doing this, all language panels stay in sync. Refer to Understanding language panel synchronization. In order to manipulate this and provide the ability to show controls on one panel and not on another, you can make window controls invisible using the Visible attribute. For example, if you need to add a control to the German variant, you must first add the control to the base version, make it invisible under the Default Language, and make it visible for the German variant. The Visible attribute makes it possible to manipulate the global add or delete, allowing controls to appear on certain panels but not others. The result of a control being made invisible is only apparent at runtime.

Editing the window panels


Often customers who want an application tailored for their language will also want the windows to be tailored for their unique needs. For instance, field names and field sizes must be manually adjusted to look appropriate for each language. It is necessary for you to manually edit the attribute values for the visual attributes on a languagespecific window panel. You must create all window text in the appropriate language, size the fields for the language-specific data, and readjust the window display to accommodate different field sizes or invisible/visible controls. Also, after the window panels are synchronized it may be necessary to manually edit the window panels to accommodate for controls that may have been added or deleted during the synchronization process. Refer to Understanding language panel synchronization for information on synchronization.

Set Objects
Lookup and Error set types are both supported for MLUI. You must manually edit the display values for each language version of a specific set. These sets have Define, Encoding, and Display values. The Define

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-9

HTML Generation

and Encoding values are shared by all the languages. The Display values are specific to each language. For an Error set, the error messages are also language specific. Create language variants for a set from the base set object. Starting with the base set, create different display values for that set in the necessary languages. MLUI makes it possible to toggle between the different languages that you have created in the repository.

Note
Figure 2-4

Deleting a language object from the repository can result in lost data for MLUI sets that use that language object. It is important that you do not carelessly delete language objects from an MLUI repository. A Set with language variant display values ENGLISH (LANGUAGE) Default Language

(SYMBOL)
DAYS_OF_WEEK (SET)
Define value = Sun Encoding = 0 Display = Sunday

Display value (Dimanche) Display value (Domingo)

FRENCH (LANGUAGE) SPANISH (LANGUAGE)

Display value (Lundi)

(SYMBOL)
Define value = Mon Encoding = 1 Display value = Monday

Display value (Lunes)

FRENCH (LANGUAGE) SPANISH (LANGUAGE)

In Figure 2-4, The Default Language object or base object is directly associated with the Set object DAYS_OF_WEEK. Its Set values are stored in the Symbol object. For language variants of this set, the language objects are associated with the Symbol object, and the Display values for each Language object are stored in the relationship between the Language object and the Symbol object.

HTML Generation
Your MLUI applications can be generated in HTML. The HTML generator picks the panels in the Current Language and generates the HTML for that language.

2-10

Developing Multi-Language User Interface Applications

Simulating the Window Flow Diagram in an MLUI environ-

Simulating the Window Flow Diagram in an MLUI environment


A Window Flow Diagram for an MLUI application is simulated using panels in the Current Language that you have set. If no Current Language panels exist for the windows you are using in your flow diagram, the base objects (in the Default Language) for those windows is used.

Understanding MLUI application preparation


An MLUI AppBuilder application is prepared using the Current Language. Refer to Understanding the Current Language setting. If there is no Current Language specified, Default Language is used. The Default Language is usually the language you specify for your base window or set objects. If there is only one instance of a window panel or set display for any given window or set it will be used in preparation. Refer to Understanding the Default Language setting for more information on base objects. Using the default makes it possible to prepare an MLUI application that has not yet been completely developed in the new Current Language. If you are developing the application for more than one language, you must prepare the application separately for each language. When preparing window panels only the window panels in the Current Language are prepared. When generating an application in HTML, first the language panels for the Current Language are extracted and the HTML is generated from these panels. When preparing sets, the display values for the set are prepared based on the Current Language.

Impact of MLUI on the application development cycle


Code Generation
The Appbuilder preparation generates code depending on the configuration settings. When preparing a MLUI enabled application, the following settings influence the output: Current Language is used to extract the appropriate window panel and set display values. An AppBuilder Rule macro gets automatically defined. The macro can be used in the Rule's Language to include any language specific Rules code. For instance, if English is the Current Language for preparation, a macro in the name of ENGLISH=TRUE gets defined. This macro can be used in the Rule's language, CG_IF(ENGLISH,TRUE) map 'ENGLISH' to myText CG_ELSE map 'OTHER' to myText

AppBuilder 2.1.0 Multi-Language User Interface Guide

2-11

Impact of MLUI on the application development cycle

CG_ENDIF The name of the macro will be the same as the Current Language of Prepare. Refer to the Rules Language Reference Guide for further information on using macros.

Client Runtime
The execution environment has not changed in AppBuilder to accommodate MLUI in any of the platforms. The preparation prepares for one language at a time, so the prepared objects are in one language which is same as the previous versions of AppBuilder.

Rebuild Facility
AppBuilder 2.1.0 offers a Rebuild Facility that makes it possible for you to build only portions of your application, eliminating the need to build the entire application each time a change is made. This section discusses issues to consider when using the Rebuild Facility with MLUI applications. For a complete discussion of the Rebuild Facility, refer to the Deploying Applications Guide. When a developer rebuilds a language panel or set display, the entire partition is rebuilt; therefore, you should consider developing a separate partition for each language. Consider the scenario where you are developing an MLUI application. One developer is building window panels in one language (for example Spanish) and another developer is building windows in a second language (for example French). Both developers are working on the same application within the same partition. In this scenario, when either developer rebuilds the partition, all windows that were changed, regardless of language, display in the rebuild list. When the French developer does a rebuild, there will be windows included in the rebuild list that he did not anticipate. The Spanish developer was working on those windows. But, more importantly, in this scenario, when the Spanish developer rebuilds his changes, he will not see his work on the rebuild list because the base windows mark for rebuild was cleared when the French developer rebuilt the partition. And the Spanish developer cannot use the French developers build, because each developer is using a different current language setting. In order for the Spanish developer to see his changes in his rebuild list, he must make an additional change to the Spanish panel; then, rebuild the partition with the current language set to Spanish. This type of scenario can get very confusing for the two developers who are working in the same partition independently. The solution is to develop a separate partition for each language. For this scenario, create two partitions, one for FRENCH and one for SPANISH. Attach the same application hierarchy to both partitions. When a change is made to a window, whether coming from FRENCH or SPANISH panels, the rebuild list on both partitions is updated, but running a rebuild clears only the mark for rebuild flag of the partition you are building. For information about partitions, refer to the Deploying Applications Guide.

2-12

Developing Multi-Language User Interface Applications

CHAPTER

3
Figure 3-1

INSTALLING MLUI FUNCTIONALITY

AppBuilder 2.1.0 Multi-Language User Interface Guide

The AppBuilder MLUI functionality is a separate installation option within the AppBuilder 2.1.0 installation program. If you choose not to install MLUI, the MLS functionality is invisible. To make MLUI fully functional within the Construction Workbench, you must install the functionality and create at least one additional language in the repository. Figure 3-1 shows the installation program panel that displays MLUI as an installation option.
Selecting MLUI during AppBuilder 2.1.0 installation

AppBuilder 2.1.0 Multi-Language User Interface Guide

3-1

3-2

Installing MLUI Functionality

CHAPTER

USING CONSTRUCTION WORKBENCH TO DEVELOP AN MLUI APPLICATION

AppBuilder 2.1.0 Multi-Language User Interface Guide

This section shows you how to use the MLUI functionality within Construction Workbench to develop a Multi-Language User Interface. The following tasks are discussed in this section: Working with language objects in the repository Setting the Workbench Options for MLUI Creating windows for different languages Creating sets in different languages

Working with language objects in the repository


The first step in creating a Multi-Language User Interface (MLUI) is to create the languages in the repository. Once you have created at least one new language, the AppBuilder MLUI functionality becomes active in the Construction Workbench. This section shows you how to complete the following tasks: Defining the Default Language in the repository Defining a new language in the repository Modifying a language object in the repository

Defining the Default Language in the repository


Defining a Default Language in the repository can be handled one of two ways: Specifying a new language object as the default Specifying an existing language object as the default

Specifying a new language object as the default


If the Default Language is a new language object in the repository, do the following: 1. From the Construction Workbench, click Tools > Language Editor. The Language Editor window displays (see Figure 4-1).

AppBuilder 2.1.0 Multi-Language User Interface Guide

4-1

Working with language objects in the repository

2. 3. 4. 5.

Click New Language. Select a language for the Name list box. Check the Default Language check box to specify this new language as the Default Language. Click Add. (Click Clear to clear the Name field and make another selection.) The new language is listed to the left of the Language Editor window as the default.

Figure 4-1

Language Editor window

New Language

Existing Repository Languages

Specifying an existing language object as the default


If you are specifying an existing object in the repository as the Default Language, do the following: 1. 2. 3. 4. From the Construction Workbench, click Tools > Language Editor. The Language Editor window displays (see Figure 4-1). Select the language from the list on the left of the Language Editor window. The Name field is populated with the language you selected. Select the Default Language check box to indicate that you want this language to be the default. Click Apply. (Click Clear to clear the Name field and select another language.) In Figure 4-1, the button displays Apply when working with existing languages, and Add when adding new languages.

Defining a new language in the repository


To create language objects in the repository, take the following steps: 1. 2. 3. From the Construction Workbench, click Tools > Language Editor. The Language Editor window displays (see Figure 4-1). Click New Language to activate the Add Language functionality. Select a language from the Name list box.

4-2

Using Construction Workbench to Develop an MLUI Application

Setting the Workbench Options for MLUI

4.

Click Add. In Figure 4-1, the button displays Apply when working with existing languages, and Add when adding new languages. The languages that are defined in the repository are listed on the left side of the Language Editor window.

Modifying a language object in the repository


To modify the name of an object in the repository or to specify that an existing language object now be the default, take the following steps: 1. 2. 3. 4. From the Construction Workbench, click Tools > Language Editor. The Language Editor window displays (see Figure 4-1). Select the language from the list on the left of the Language Editor window. The Name field is populated with the language you selected. Make the necessary modification to the language name or its default status. Click Apply. (Click Clear to clear the Name field and remake your selection.)

Deleting a language object in the repository


The Construction Workbench and the Freeway Explorer do not provide explicit support for deleting language objects. Language objects can be deleted using the Enterprise Repository when you are in an ADM project. Refer to Chapter 3 in the Enterprise Administration Guide for information about the ADM project type.

Setting the Workbench Options for MLUI


Note Before you can set MLUI options here, you must define the language objects in the repository. See Working with language objects in the repository.

To set the MLUI Workbench Options settings, take the following steps: 1. From the Construction Workbench, click Tools > Workbench Options > General. The Workbench Options window is displayed (see Figure 4-2).

AppBuilder 2.1.0 Multi-Language User Interface Guide

4-3

Creating windows for different languages

Figure 4-2

Workbench Options window

MLUI Settings

Current Language - When you specify the Current Language from the Workbench Options window, AppBuilder automatically opens all window and set language panels in the Current Language. This makes it easier for you to develop large portions of an application in a single language. Default Language - If you have defined a language in the repository as your Default Language, that Default Language is displayed here. 2. Click OK to save your settings and close the window.

Creating windows for different languages


A window panel can be created for any language in a specified language group or codepage. Once you have a window object in the repository, you can create different language panels for that window. To create window panels in different languages, take the following steps: 1. 2. Create the window as you would in any AppBuilder application. Refer to the Development Tools Reference Guide for information about using Window Painter to create windows. Select the window in Window Painter.

4-4

Using Construction Workbench to Develop an MLUI Application

Creating windows for different languages

3.

From the Construction Workbench, click Edit > Languages > Create Language. Only the defined repository languages that have not yet been used for this window are displayed on the Create Language menu.
Before you can create a language panel for a window, you must have that language object defined in the repository. Refer to Defining a new language in the repository for steps on creating language objects in the repository.

Note

The important thing to consider when creating different language panels for a window is that each language panel requires manual adjustments to the window. For instance, the text labels for the fields and windows have to be manually created in the new language; field sizes have to be adjusted for data in a different language; and certain window controls may be made visible or invisible. This section provides instructions for completing the following tasks: Editing attributes for a specific language panel Understanding the Language menu Deleting a language panel Viewing a specific language panel Synchronizing language panels

Editing attributes for a specific language panel


At this point in the development, you have created your window following the general AppBuilder steps outlined in the Development Tools Reference Guide, and you have opened the window with the Current Language setting of your choice. The Current Language can be set from the Workbench Options window (see Setting the Workbench Options for MLUI). This section discusses customizing the GUI interface for each panel: Editing window attributes Editing window control attributes Using the Visible attribute for a window control

Editing window attributes


To edit the window attributes, take the following steps: 1. Double-click on the face of the open window panel. Or, right-click on the window and select Properties. The Properties panel for that window is displayed (see Figure 4-3).

AppBuilder 2.1.0 Multi-Language User Interface Guide

4-5

Creating windows for different languages

Figure 4-3

Window properties

2. 3.

At the very minimum, you must change the text label for the window title bar. Highlight the Text field and type the title bar text in the new language. Edit the other attributes as necessary.

Editing window control attributes


To edit the window control attributes, take the following steps: 1. Right-click on the window control and select Properties. The Properties panel for that window control is displayed (see Figure 4-4). 2. 3. At the very minimum, you must change the text label for the window control. Highlight the Text field and type the text label in the new language. Edit the other attributes as necessary.

Using the Visible attribute for a window control


When you add a control to or delete a control from the base window object, AppBuilder automatically adds or deletes that control from all the language panels for that window. You may have an instance where you want the control to appear on certain language panels but not on others. To manipulate this, use the Visible attribute on the Properties panel for that window control (see Figure 4-4).

4-6

Using Construction Workbench to Develop an MLUI Application

Creating windows for different languages

Figure 4-4

Window Control Properties panel

Highlight the Visible field and select from the drop-down list box. True makes the control visible at runtime, and False makes the control invisible at runtime.

Understanding the Language menu


AppBuilder gives you the flexibility to work with the different language panels for your window or set by using the Language menu. 1. 2. Highlight the window in the work area. From the main menu, click Edit > Language. The following options are available from the Language menu:
Language menu options for a window panel Description Displays the panel that is created in the Default Language. This is your base panel from which the other language panels are created. Displays the panel that is created in your Current Language, as it is defined on the Workbench Options window. This option is only visible if a window panel is created in the Current Language. This option lists the languages in which this window or set is already created. Select the language to display the panel for that language. If there are languages in the repository that have not been used for this window or set, they are not listed under this option.

Table 4-1 Option

Show Default Panel

Show Current Panel

Show Language Panel

AppBuilder 2.1.0 Multi-Language User Interface Guide

4-7

Creating windows for different languages

Table 4-1 Option

Language menu options for a window panel Description This option lists the languages that are defined in the repository. Select the language for which you want to create the next panel. No more than 10 languages will display on this menu. If you want an additional language, select the Languages... option. This option deletes a selected language panel from the repository. This option gives you the ability to change the language for a specific panel. Set Language has the same result as deleting a language panel and creating another panel in a different language to replace it. After using Set Language, you must edit the visual attributes of the window panel. Set Language lists only the repository languages that have not yet been used to create a window panel. (For window panels only) This option shows you what the synchronization will do before it does it, so that you can verify whether or not you want to synchronize at this time. See Synchronizing language panels for more information. (For window panels only) This option synchronizes the language panels. You should verify the synchronization before you actually synchronize your panels. See Synchronizing language panels for more information.

Create Language Panel

Delete Language Panel

Set Language

Verify Synchronization

Synchronize Language Panels

Deleting a language panel


To delete a language panel, click Edit > Language > Delete Language Panel, and select the appropriate language for the language panel you are deleting.

Viewing a specific language panel


Once you have created window panels in different languages, you can easily display a specific language from the Language menu. You must have already created the panel in that language. Click Edit > Language, and do one of the following: To view the panel in the Default Language, click Show Default. To view the panel in the Current Language, click Show Current. To view a panel in any language that you have used, click Show Language and choose the language. Only the languages in which you have created panels display in this menu.

Note

The MLUI menus can display up to 10 languages. To work with additional languages, select the menu option Languages... With a language panel active, click Edit > Show Language Panel > Languages... The Select Language window displays listing all the languages you have available for that option.

Synchronizing language panels


AppBuilder MLUI automatically synchronizes your language panels with the base object. Sometimes it is necessary to synchronize the language panels that may have been created by different developers within different repositories. During the synchronization process, window controls may be added, deleted, or substituted for other controls. To see whether or not changes will be made to the window before they are

4-8

Using Construction Workbench to Develop an MLUI Application

Creating sets in different languages

made, run the Verify Synchronization option before you run Synchronize. For more information on synchronization, refer to Understanding language panel synchronization. To verify whether or not windows will be changed during synchronization, click Edit > Language > Verify Synchronization. A synchronization report displays indicating how many changes will be made on each window panel. To synchronize your window panels, click Edit > Language > Synchronize Language Panels. It is necessary for you to review the language panels after synchronization so that you are aware of any changes that have been made.

Creating sets in different languages


You can create different display values for Lookup and Error set types for MLUI applications. You must manually edit the display values for each language version of a specific set. To create a set in different languages, take the following steps: 1. 2. 3. Create the Lookup or Error set as you would in any AppBuilder application. Refer to the Development Tools Reference Guide for this information. Highlight the open set window in the Construction Workbench work area. From the Construction Workbench, click Edit > Languages > Create Language. Only the defined repository languages that have not yet been used for this set are displayed on the Create Language menu.

Table 4-2 displays the menu options for a set.


Table 4-2 Option Show Default Language menu options for a set Description Displays the set display that is created in the Default Language. This is your base set from which the other language displays are created. Displays the set display that is created in your Current Language, as it is defined on the Workbench Options window. This option is only visible if a set display is created in the Current Language. This option lists the languages in which this window or set is already created. Select the language to display the panel for that language. If there are languages in the repository that have not been used for this window or set, they are not listed under this option. This option lists the languages that are defined in the repository. Select the language for which you want to create the next panel. No more than 10 languages will display on this menu. If you want an additional language, select the Languages... option. This option deletes a selected language set display from the repository. This option gives you the ability to change the language for a specific set display. Set Language has the same result as deleting a language set display and creating another set display in a different language to replace it. After using Set Language, you must edit the Visible attributes of the set display. Set Language lists only the repository languages that have not yet been used to create a set display.

Show Current

Show Language

Create Language

Delete Language

Set Language

AppBuilder 2.1.0 Multi-Language User Interface Guide

4-9

Creating sets in different languages

4-10

Using Construction Workbench to Develop an MLUI Application

APPENDIX

A
Japanese

LANGUAGE GROUPS

AppBuilder 2.1.0 Multi-Language User Interface Guide

This section lists the languages that have been tested with AppBuilder MLUI. The following codepages are listed sequentially with the languages that comprise them. Codepage 932

Codepage 936 Chinese (PRC and Singapore) Codepage 949 Korean Codepage 950 Chinese (Taiwan, Macau S.A.R., Hong Kong S.A.R.) Codepage 1250 Czech Polish Codepage 1252 Danish Dutch English French German Italian Portuguese Spanish Codepage 1253 Greek

A-1

A-2

Language Groups

Index

INDEX
AppBuilder 2.1.0 Multi-Language User Interface Guide

A
add (global) 2-9 attributes 2-8, 4-6 generic 2-8 Visible 4-6 visual 2-8, 4-5

H
HTML generation 2-10, 2-11

I
installing MLUI functionality 3-1

C
client runtime 2-12 code generation 2-11 codepage 1-2, A-1 Construction Workbench menu behavior 2-3 controls editing attributes 4-6 controls on an MLUI window 2-8 creating language objects 4-1, 4-2 creating language panels 4-4 creating sets in different languages 4-9 Current Language 2-3, 2-4, 2-5, 2-10, 2-11, 4-4

L
Language Editor 4-1, 4-2, 4-3 language group 1-2, A-1 Language menu 4-7 language objects 4-5 creating 4-2 defining default language 4-1, 4-2 deleting 4-3 modifying 4-3 language panel synchronization 2-6, 4-8 Lookup set 2-9

M
menus for MLUI functionality 2-3 migration issues panels out of sync 2-6 populate the group repository first 2-5 pre-MLUI AppBuilder repositories 2-7 MLS 1-1 MLUI 1-1 AppBuilder design 2-1 Appbuilder products enabled for 1-2 client runtime 2-12 code generation 2-11 developing applications with 2-1 installation option 3-1 menu behavior 2-3 preparation 2-11 Rebuild Facility 2-12 window objects 2-8 Workbench Options settings 2-2 modifying language objects 4-3 Multi-Language User Interface (MLUI) 1-1 Multiple Language Support (MLS) 1-1

D
Default Language 2-3, 2-4, 2-5, 2-11, 4-1, 4-2, 4-4 delete (global) 2-9 deleting a language panel 4-8 deleting language objects 4-3 developing MLUI applications 2-1 display values for sets 4-9 dynamic menus 2-3

E
editing attributes 4-5, 4-6 editing window panels 2-9 Error set 2-9

G
generation of code 2-11 generic attributes 2-8 global add 2-9, 4-6 delete 2-9, 4-6

AppBuilder 2.1.0 Multi-Language User Interface Guide

O
objects in the repository 4-1

P
panel properties 4-6 panels 4-4 editing 2-9, 4-5 panels for MLUI windows 2-8 preparation 2-11

R
Rebuild Facility and MLUI 2-12 repositories creating language objects 4-1, 4-2, 4-5 deleting language objects 4-3 migrating objects from a personal repository to a Workgroup repository 2-5 modifying language objects 4-3 pre-MLUI AppBuilder 2-7 runtime 2-12

S
Set objects Error 2-9 Lookup 2-9 sets 4-9 synchronization verifying 2-7 synchronizing 2-6, 4-8

V
verifying synchronization 2-7 viewing a language panel 4-8 Visible attribute 4-6 visual attributes 2-8, 4-6 editing 4-5, 4-6

W
window attributes 2-8, 4-5 controls 2-8, 4-6 manual edit of 2-9 panels 2-8, 4-4 window control attributes 2-8 Window Flow Diagram 2-11 window objects in MLUI 2-8 window properties 4-6 Workbench Options settings 2-2 Current Language 2-3, 2-4, 2-5, 4-4 Default Language 2-3, 2-4, 2-5, 4-4

Index

ii

S-ar putea să vă placă și