Creating a Localized Version

Topics:

You can create additional localized versions of WebFOCUS in addition to the localized versions supported by Information Builders. When you create a localized version, the user interface appears and functions the same as the original version. The only difference is the language displayed in the interface.

In order to configure the WebFOCUS interface to display another language, you must first create resource files by executing the Language Resource Files Utility to automatically install the necessary resource files. In the new resource files you must then translate the English character strings to the new language.

The utility is located in the drive:ibi\WebFOCUSnn\utilities\lang directory as CreateLangRes.bat in Windows installations, where nn is your version of WebFOCUS, and as CreateLangRes in UNIX installations.

You can install the following language files with English content by running this utility:

Arabic Italian
Croatian Korean
Czech Latvian
Danish Lithuanian
Dutch Norwegian
English (Australian) Polish
English (Canadian) Portuguese (Portugal)
English (British) Romanian
Finnish Russian
German (Austrian) Slovak
Greek Swedish
Hebrew Thai
Hungarian Turkish

Note: The Austrian German resources are created from the German resources.

The utility provides prompts and the necessary information to guide you during the installation.

Note: The following image is from a Windows version. Similar text and prompts are available from the UNIX version.


CreateLangRes dialog box

Example: Creating a Language Resource File

The following is an example of how to install the German (Austria) language resource files. When you install new files, any existing language resource files are overwritten.

  1. Navigate to drive:\ibi\WebFOCUSnn\utilities\lang, where nn is your version of WebFOCUS, and double-click CreateLangRes.bat to execute the utility.
  2. Ensure that your web server and application server are stopped, as instructed. Enter C to continue.

    The CreateLangRes dialog box opens.

  3. Select German - Austrian from the list of available languages.
  4. Ensure that the correct WebFOCUS installation directory is listed, and click Run.
  5. The utility displays which set of files are being created and the user is notified upon successful completion.

    A ConvertLangRes log file is created at drive:\ibi\WebFOCUSnn\logs, where nn is the version of WebFOCUS that you are using.

Translating a Properties File

How to:

For files that must be modified and have the extension .properties, the text within the file is structured in pairs. On each line exists a pair, separated by an equal sign (=). On the left side is the original text as processed by WebFOCUS. On the right are the words written as they will be seen by the user. For example:

welcome=Welcome
to_the=to the

If you want to open an existing translated file to see how it is translated for other languages, you can do so. These files have either a language prefix or suffix added to the file name. For example, a file translated into Spanish has the prefix or suffix ES.

Note: All *.properties files must be encoded as UNICODE. If you want to make a change, you have to use the native2ascii java utility. For more information on how to use this utility, go to: http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/native2ascii.html

The use of visible NLS characters as part of the Latin-1 encoding is acceptable because the Latin-1 area of ASCII and UNICODE are transparent (except for the euro symbol). If the file includes a euro symbol, or any non-Latin-1 character (such as Hebrew, Chinese, or Japanese), it must be transcoded using the native2ascii tools that Java JDK provides. For more information about the usage of native2ascii, please refer to the Oracle JDK documentation.

Procedure: How to Localize a Properties File

This example illustrates how to translate the text on the right side of the equal sign to read as it should in the localized language:

WebFOCUS text=localized text

where:

WebFOCUS text

Is the text processed by WebFOCUS. This text should not be modified.

localized text

Is the original English text translated into the localized language.

Example: Translating Lines in a Properties File

The following is an example of the beginning of a properties file that has been translated into Spanish:

# $Revision: 1.55 $:
# US_Revision: 1.110
# @(#)CasterSchedule.properties	
#
# Resource strings for ReportCaster
 
###### Main Window ######
### Main Frame ###
Main.Title=ReportCaster
### Main Label ###
Main.Label=Desarrollo y administración de ReportCaster
Main.Icon=reportcaster.gif
Main.Tree.Label=Carpetas
 
Main.User.page=RCSchedulePage.htm
############ MAIN TREE ###########################
Main.Tree.Node.root=Elementos de programación
Main.Tree.Node.Root.icon=schedule.gif
Main.Tree.Node.schedules=Elementos de programación
Main.Tree.Node.Schedules.icon=single_user.gif
Main.Tree.Node.Root.page=RCScheduleMain.htm
 
Main.Page.Schedules=Planificaciones
Main.Page.Library=Librería de informes
Main.Page.Admin=Gerencia y configuración de usuario
 
############ MAIN TABLE ###########################
Main.Table.Header.ACTIVE.tip=Clasificar por: Estado activo
Main.Table.Header.NOTIFY_FLAG.tip=Clasificar por: Indicador de notificación
Main.Table.Header.METHOD_CODE.tip=Clasificar por: Método de distribución
Main.Table.Header.SCHEDULEID.tip=Sort by: Schedule ID
Main.Table.Header.JOBDESC.tip=Clasificar por: Descripción de trabajo
Main.Table.Header.NEXTRUNTIME.tip=Clasificar por: Próximo tiempo de ejecución

Translating a JavaScript Resource File

How to:

In JavaScript resource files used by WebFOCUS, each .put statement contains two statements enclosed in double quotation marks ("). The following is an example of a JavaScript .put statement:

worptrans.put("Default Report","Default Report");

Procedure: How to Localize a JavaScript Resource File

In each .put command, translate the second statement in double quotation marks (") into the localized language, as follows:

command.put("WebFOCUS text","localized text");

where:

command

Is the JavaScript .put command. This is not modified.

WebFOCUS text

Is the first statement in the parentheses, enclosed in quotation marks. This statement is for WebFOCUS processing, and should not be modified.

localized text

Is the WebFOCUS text translated into the localized language.

Example: Translating Lines in a JavaScript Resource File

The following is an example of a JavaScript resource file translated for a localized French version:

/*
** $Revision:   1.41  $
** US Revision: 1.59 
*/
var FRranls_js_Revision = "$Revision:   1.41  $";
 
// ***********************************************************
// ** WebFOCUS Report Assist NLS Javascript for IE
// ***********************************************************
 
function createRATransHashTable()
{
  var rpTrans = new ibihash(mapIbiUrl);
  rpTrans.put("rpasstieTitleString","Générateur de Rapport de WebFOCUS");
  rpTrans.put("haaboutRevision","Version 5 Révision 2.0");
  rpTrans.put("haaboutOKButton","/ibi_html/javaassist/intl/FR/FRHAfcokon.gif");
  rpTrans.put("haaboutTableGIF","/ibi_html/javaassist/ibi/html/assist/HAabout.gif");
  rpTrans.put("haaboutGraphGIF","/ibi_html/javaassist/ibi/html/assist/hagabout.gif");
  rpTrans.put("ColumnTitleString","Surlignez les champs et cliquez AJOUTER en mode 
         Liste ou glissez-déposez les champs en mode Structure");
  rpTrans.put("ColumnOptionsTitleString","Surlignez le champ que vous voulez 
         personnaliser");

Translating a Text File

How to:

Text files used by WebFOCUS contain a revision number at the top of the file, and below this, pairs of text. Each pair of text has two parts: the first is information passed to WebFOCUS followed by a comma, and the second is the text viewed by a user enclosed in double quotation marks ("). The following is an example of lines from a text file as used in WebFOCUS:

Sort, "Sort"
Footing, "Footing"

Procedure: How to Localize a Text File

Translate any text in double quotation marks (") into the localized language, as follows:

WebFOCUS text, "translated text"

where:

WebFOCUS text

Is the first statement on the line, before the comma (,). This statement is for WebFOCUS processing, and should not be modified.

translated text

Is the second statement in the line, translated into the local language and enclosed in double quotation marks (").

Note: You can only translate text within double quotation marks that fall within the #Do translate Begin Block and the #Do translate End Block lines. Anything within #Do Not Translate Begin Block and #Do Not Translate End Block will cause WebFOCUS to malfunction.

For example, in the following image you can translate everything in double quotation marks (") following the #Do translate Begin Block.


Example of a text file with a #Do not translate block

Example: Translating a Text File

The following is an example of a text file modified for a localized French version:

# Copyright 1996-2011 Information Builders, Inc. All rights reserved.
$Revision: 1.21 $:
# US_Revision:   1.14
StringTable
# Do not translate Begin Block
nameSpace,"http://informationbuilders.com/"

# Do not translate End Block
serverTitle,"S\u00e9lectionnez le serveur"
appTitle,"S\u00e9lectionnez l'application"
fexTitle,"S\u00e9lectionnez les Fex"
selectServer,"Veuillez s\u00e9lectionner un serveur"
selectApp,"Veuillez s\u00e9lectionner une application"
Submit,"Soumettre"
Reset,"R\u00e9initialiser"
Server:,"Serveur:"
Application:,"Application:"
NoApplication,"Aucune application"
Checkfocexec,"S\u00e9lectionnez les focexec(s) souhait\u00e9s pour cr\u00e9er le service web."
SelectFormat,"S\u00e9lectionnez le format que vous voulez utiliser."
formatDisco,"format 'disco'"
formatWsdl,"format 'wsdl'"
formatUrlDisco,"format 'URL' (disco)"
formatUrlWsdl,"format 'URL' (wsdl)"
minlist,"Liste minimum"
FexOnly,"Fonction FEX uniquement"

WebFOCUS

Feedback