Skip to content. | Skip to navigation

Sections
Personal tools
You are here: Home Accelerate Articles Enable Multi-language Support in SB+

Enable Multi-language Support in SB+

The SB+™ Server is an application development tool within the U2 database environment, and comprises the default development tools, runtime support libraries, and server-side execution of client/server functions. Use the new functionality in SB+ to build an application that functions in multiple languages using multiple definitions.

Level: Introductory

Ehab AbuShmais ( eabushmais@rs.com), Global Technical Support Manager, Rocket Software

21 Jul 2005

Introduction

Faced with the increasing globalization of the world economy, software developers need to implement software solutions that can be easily adapted to different languages, cultures, customs, and regulations in order to establish a stronger presence in the global market. SB+ supports one language per account, or the "single-definition method," but it is also possible to support multiple languages in the same account.

This document describes the new functionality in SB+ which allows an application to function in multiple languages using multiple definitions. The SB+ online documentation (see Resources) explains the single-definition method in detail. This article expands and simplifies the process of enabling multi-language support in SB+ applications. If you are new to SB+ multi-language support, please read the online documentation before applying the techniques presented in this article.

Multi-language support within an SB+ account/application can help you create an SB+ application for users who speak different languages. For example, in Germany, an application's users may speak French, German, or English. Making your application accommodate multiple languages is more powerful and efficient than developing separate applications.

This function is meant to be used by developers (and not end users). To deploy it successfully, you need a proficient level of SB+ knowledge.


Setting up multi-language support

  1. Log in to your SB+ administration account.
  2. Activate multi-language support:

    In the SB+ Main Menu, select Admin > SB+ Setup > SB+ Control Parameters. Click F5 Sys Defaults. In Enable Multi-language Support, select Yes.


    Figure 1. System defaults screen
    System defaults screen
  3. Add language codes and descriptions for each supported language into the Language Table:

    In the SB+ Main Menu, select Admin > SB+ Setup > SB+ Control Parameters. Click F5 Sys Defaults, then click F7 Language Table.

    I recommend using ISO standard language codes (see Resources).


    Figure 2. Language table screen
    Language table screen

    Note: When you add a language to the table, SB+ checks whether the corresponding language file DMLANGUAGE.XX (or the user-specified file) exists. If not, it is created. When you remove a language from the table, its corresponding language file is not deleted.

  4. Log in to your application account.
  5. Execute /HK.CONTROL to open the control panel. Click F5 Additional, and set Enable Multi-language Support to Yes.
  6. Execute /TRANSLATE to do batch translation. Press F3, select a language from the code table you have defined, and press Enter.

    Note: You can also use process /OL at specific translatable attributes in SB+ tools. (Refer to /GENHELP > Technical Information > Other Functions > Multilingual Support.)


    Figure 3. SB+ language prompt
    SB+ language prompt
  7. Select the SB+ tool that you wish to translate.
  8. Select the file you want to translate.
  9. Select the specific translatable item.
    Figure 4. Translation definition and process list
    Translation definition and process list

    For example, if you select a Field definition in the SB tool, you will see a list of translatable items, much like the left window in Figure 4, but listing your dictionary fields. The field descriptions appear in the base language. You can enter the new language text in the entry field.

    You will also be able to enter translated text for the report heading, and help for this dictionary item.


    Figure 5. Field definition translation screen
    Field definition translation screen
  10. Press F2 to save your changes, and escape all the way out of the translate screens.
  11. Clear the driver file.
  12. Set your /USER.FLAGS to specify the language you want to use for this application account.
  13. Translate the following items from DMCONT:
    DIALOG EDITKEY.DESCRIP ERROR
    F3.OUTPUT.DEST F3.S/P F3.S/P/F
    F3.S/P/L2 F3.S/P/N ERROR
    F3.S/P/X/A F3.S/P/X/B F3.S/P/X/D/F
    F3.S/P/X/D/F/B F3.S/P/X/L F3.S/P/X/L2
    F3.SPXDFBH F3.SPXDFH F3.SPXH
    F3.SPXPH F3.YESNO GENERAL.TEXT
    LICENCE.SBCLIENT MESSAGE OPTIONS
    PROMPT PROMPT.OPTIONS QUES.OPS
    SB.WELCOME.ASK SBERROR.TEXT STATUS.LINE

Notes:

  • For GUI screens, run /REGEN.GUI with the "L" option so that the screen definition will get generated using the longest language version of each field description. The GUI screen link flag must be set to Y for translation to work on forms.
  • Translate 'Report Heading' as that is the label used for MV fields when the prompt is set to 'A'bove and not the field description translation.
  • To translate specific description, like function keys on a form (SD > F7, use /OL process on the description field.
  • Developers may create translated versions of the SB+ text files MESSAGE, ERROR, DIALOG, PROMPT, GENERAL.TEXT, QUES.OPS, STATUS.LINE, SCR.TEXT and CALENDAR.TEXT in DMCONT. SB+ will look for these items in the language translation files before falling back to the base language versions in DMCONT.

    For example: When SB+ interprets CALL SB.DISP(3, '[E17]'); * INVALID DATE with the user's language flag set to SP (Spanish), SB+ will first look for a translated version in DMLANGUAGE.SP ERROR attribute 17 before falling back to the base language version in DMCONT.

    The text items relating to the user messages (xxDEFN MESSAGE) can be translated by creating an equivalent xxDEFN*MESSAGE in the appropriate language translation file.


Resources

Learn

About the author

Ehab AbuShmais photo

Ehab AbuShmais spent 12 years as an SB+ software engineering experienced in SB+ products support, engineering, and consulting. Ehab is the author of the book Building Applications Using SB+ GUI. Ehab is the author of SB+ troubleshooting guide. Ehab holds a BS in Information Systems Engineering from SPSU Marietta Georgia, MS in Computer Information Systems and MBA in Technology Management from University of Denver.


 

Document Actions