1<HTML><!-- #BeginTemplate "/Templates/MainTemplate.dwt" --> 2<HEAD> 3<!-- #BeginEditable "doctitle" --> 4<TITLE>RB Manager Tutorial - Creating Resource Files</TITLE> 5<!-- #EndEditable --> 6<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> 7<STYLE TYPE="TEXT/CSS"> 8<!-- 9.topicHead { font-family: "Times New Roman", Times, serif; font-size: 14pt; font-weight: bold; text-align: center; color: #333333} 10.topicList { font-family: Georgia, "Times New Roman", Times, serif; font-size: 9pt; color: #FF0099; list-style-image: url(../images/diamond_bullet.gif); text-decoration: none; font-weight: bold} 11.mainBlock { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 5px; padding-top: 5px; padding-right: 10px; padding-bottom: 5px; padding-left: 10px; text-align: justify} 12--> 13</STYLE> 14</HEAD> 15 16<BODY BGCOLOR="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"> 17<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"> 18 <TR> 19 <TD ROWSPAN="2" COLSPAN="2" BACKGROUND="../images/template_ul.gif" HEIGHT="75"><IMG SRC="../images/spacer.gif" WIDTH="280" HEIGHT="1" HSPACE="0"></TD> 20 <TD HEIGHT="15" WIDTH="100%" BACKGROUND="../images/template_u.gif"></TD> 21 </TR> 22 <TR> 23 <TD HEIGHT="60" > 24 <CENTER><IMG SRC="../images/TitleLogo_transparent.gif" VSPACE="0"></CENTER> 25 </TD> 26 </TR> 27 <TR> 28 29 <TD WIDTH="200" BACKGROUND="../images/template_l.gif" VALIGN="top"> 30 <TABLE WIDTH="180" CELLSPACING="0" CELLPADDING="1"> 31 <TR> 32 <TD CLASS="topicHead">General</TD> 33 </TR> 34 <TR> 35 <TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD> 36 </TR> 37 <TR> 38 <TD CLASS="topicList"> 39 <UL> 40 <LI><A HREF="../system_requirements.html">System Requirements</A></LI> 41 <LI><A HREF="../faq.html">FAQ</A></LI> 42 <LI><A HREF="../future_features.html">Future Releases</A></LI> 43 <LI CLASS="topicList"><A HREF="../future_features.html">Version 44 History</A></LI> 45 </UL> 46 </TD> 47 </TR> 48 <TR> 49 <TD CLASS="topicHead">RB Manager</TD> 50 </TR> 51 <TR> 52 <TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD> 53 </TR> 54 <TR> 55 <TD CLASS="topicList"> 56 <UL> 57 <LI><A HREF="../index.html">Home</A></LI> 58 <LI><A HREF="index.html">Tutorial</A></LI> 59 <LI><A HREF="../views/index.html">Functionality and Views</A></LI> 60 <LI><A HREF="../lookandfeel.html">Look and Feel</A></LI> 61 <LI><A HREF="../menu.html">Menu Items</A></LI> 62 <LI CLASS="topicList"><A HREF="step1.html">Preferences</A></LI> 63 </UL> 64 </TD> 65 </TR> 66 <TR> 67 <TD CLASS="topicHead">RB Reporter</TD> 68 </TR> 69 <TR> 70 <TD VALIGN="center"><IMG SRC="../images/template_line.gif"></TD> 71 </TR> 72 <TR> 73 <TD CLASS="topicList"> 74 <UL> 75 <LI><A HREF="../RBReporter.html">Home</A></LI> 76 <LI>Report Types</LI> 77 <LI><A HREF="../scanfile.html">Code Scanning</A></LI> 78 </UL> 79 </TD> 80 </TR> 81 </TABLE> 82 83 <P> </P> 84 </TD> 85 86 <TD COLSPAN="2" VALIGN="top" CLASS="mainBlock"><!-- #BeginEditable "Main" --> 87 <H3 ALIGN="CENTER">Step 5. Adding Resource Files for New Languages</H3> 88 <P><B>Creating a New Language File</B></P> 89 <P>The only way by which to create a new language file is by selecting the 90 'Add New Resource File...' option from the 'Options' menu. When you do 91 so a dialog box will appear similar to this:</P> 92 <P><IMG SRC="../images/screenshots/basic_file.gif" WIDTH="620" HEIGHT="421"></P> 93 <P>The top three fields identify the file. The bottom three sections, Language, 94 Country, and Variant define the role of the resource file within the bundle. 95 The only required field is the encoding field for the language. The encoding 96 fields are inserted into the name of the resource file whenever the fields 97 are filled. The file name would following the pattern <CODE>baseclass_language_encoding_variant.properties</CODE>. 98 In the above example, the file would be named<CODE> RBTutorial_de.properties</CODE>. 99 Note that it is important to define fallback files for each language (i.e. 100 if you have a file for <CODE>RBTutorial_de_DE.properties</CODE>, you should 101 also have a file for <CODE>RBTutorial_de.properties</CODE>).</P> 102 <P>Since there may be instances where the language file being created may 103 have few differences from the base class property file, an option is given 104 for copying or not all of the resources from the base class file to the 105 new file. By default, this option is selected and each resource will be 106 copied from the base file and marked as untranslated in the new resource 107 file.</P> 108 <P><B>Working with the New Language File</B><BR> 109 </P> 110 <P>Once a language file has been created, there will be resources that need 111 to be translated. This can be done from two different views. First, go 112 to the tree on the lower left of the screen and select the file that you 113 have just created. In this case it will be under the language encoding 114 de node of the tree. Select the file by clicking on it once. Selecting 115 the 'Untranslated' tab on the right should result in a view similar to 116 this:</P> 117 <P><IMG SRC="../images/screenshots/basic_untranslated.gif" WIDTH="750" HEIGHT="416"> 118 </P> 119 <P>This section displays all of the resources that are marked as untranslated 120 in the file. Alternatively, you could select the 'Groups' tab and see 121 all of the resources, one group at a time, whether or not they have been 122 marked as translated. Double clicking on a row in the the tables present 123 in either view will bring up a dialog box similar to one you have all 124 ready seen:</P> 125 <P><IMG SRC="../images/screenshots/basic_translation.gif" WIDTH="513" HEIGHT="269"></P> 126 <P>The top three editable components are all disabled. This is because changing 127 them would required editing files other than the one currently being viewed. 128 This type of editing can be accomplished only from the base class. To 129 change the translation value, alter the field labeled 'Translation:' with 130 the new translation. You may also change the resource comment and lookup 131 comments if you like, but this change will be visible only from RBManager. 132 You also may find that the resource requires no translation if this is 133 the case, just select the 'Translated' check box at the bottom of the 134 dialog and press 'Edit'. If you change the translation, the 'Translated' 135 check box will automatically check itself when you are finished.</P> 136 <P>Continue this process until you have completely translated this file, 137 or leave the file untranslated, but save your work so that you or someone 138 else can return to it later. To learn how to save your results, go to 139 the next step.</P> 140 <P><A HREF="step4.html">Back to Step 4</A> -or- <A HREF="step6.html">Forward 141 to Step 6</A></P> 142 <!-- #EndEditable --></TD> 143 </TR> 144 <TR> 145 <TD BACKGROUND="../images/template_ll.gif" HEIGHT="40" WIDTH="200"> 146 <!-- Comment --> 147 </TD> 148 <TD WIDTH="80"> 149 <!-- Comment --> 150 </TD> 151 <TD> 152 <CENTER><SPAN CLASS="Copyright">Copyright 2000-2001 International Business Machines, All Rights Reserved</SPAN></CENTER> 153 </TD> 154 </TR> 155</TABLE> 156 157</BODY> 158<!-- #EndTemplate --></HTML> 159