-
Notifications
You must be signed in to change notification settings - Fork 109
fe_man_localize
Using FEMan to localize front-end text strings for Homeworld.
\
All front ends in Homeworld are created using the FEMan tool. Front-end text is also localized using the FEMan tool. Front-end text that is procedurally drawn is localized in English, French and German.script files. Localizing text in FEMan is a fairly straightforward task, if you are careful.
\
In FEMan, the properties of rectangles determine the operation of the front end in Homeworld. As such, you should never modify the contents of the rectangle properties dialogs unless otherwise noted. See diagram below for what you should not be modifying.
\
\
\
\
\
Fig 1: what you should not modify until you are localizing hotkeys (see below).
\
\
\
\
\
\
In most cases, there will be a text string floating on top of a rectangular region that becomes a button in the game. Some care should be exercised to ensure that one clicks on the text string rather than the rectangular region. What region was clicked on can easily be determined by the bright dotted border that is drawn as illustrated below.
\
Fig 2: Correct and incorrect selection of the text string “Tutorial”. (a) is incorrect while (b) is correct.
\
\
\
\
Once the text string is selected, right-click on it to bring up the properties for the text string. It should look roughly like what you see below.
\
\
\
\
\
Fig 3: Text string properties with all 6 languages visible. The last 3 languages are placeholders for possible future localization. You don’t have to translate to these languages.
\
\
\
\
\
\
\
\
\
\
\
From here, type in the localized text strings. Most often, there will be the same text string in all text entry boxes. This is the default. You will also notice that there is often an ampersand character ‘&’ in the string. This is a special formatting character that will draw the next character underlined in the FEMan and highlighted in the game. This is a cue to the player for what hot-key to use for that button. There will be more on hot-keys later.
\
You will also notice a set of radio buttons for justification. This is needed because text strings of different languages will be different lengths. When the language changes, the text string’s bounding rectangle does not. Hence, you have to specify how the text string is justified within a rectangle that is the size of the longest language of that text string. As a general guideline, button text is centre justified. Most other text is right justified. Don’t worry too much about this, however. Justification can be and will be tweaked by us later. Centre-justification is the default.
\
There are a number of other guidelines I would like everyone to follow when working with FEMan.
-
Save often. FEMan is not a bulletproof program and it has no undo. If you make a mistake, you’ll have to re-load to fix it. Therefore, save often, every string you localize perhaps.
-
Avoid moving strings and rectangles around. Many of these rectangles are lined up to the pixel. If they are moved just 1 pixel, glitches will appear in the front-end that are obvious and require attention. If you accidentally move a rectangle or string, you can use the arrow keys to fine-tune it back into position.
-
Ignore characters that are missing from the fonts we use. We will be editing the fonts we use to ensure they have all the missing characters. You don’t have to worry about this as long as the text in the text string properties has all the ‘foreign’ characters.
\
To view the text string you have localized in the different languages, use Control-number where number is:
-
English
-
French
-
German
-
Pig Latin (not used)
-
Swahili (not used)
-
Sanskrit (not used)
You will probably have to switch back and forth quite often to test your justification.
\
Most buttons in Homeworld front-end screens have hot keys. When typing in the localized text strings, you should consider what letter in the strings is to be the hot key for that button. Obviously, there cannot be 2 buttons on a screen with the same hot key. Usually it is best to place the hot key on the first letter of the string, or failing that, on the first letter of the stressed syllable of the word. For example &Tutorial or Tut&orial would use T or O as the hot key.
\
You already know how to place the formatting character so the user knows what letter is a hot key. Just using this formatting character is not enough. Despite my rant earlier about how to select the text string and how not to select a button rectangle, I now want you to select a button rectangle and get it’s properties. It will look something like this.
\
\
\
\
\
Fig 4: properties for the “Tutorial” button rectangle. Notice the “HotKey” definition.
\
\
\
\
\
\
\
\
\
\
The “HotKey” string in the User Defined Information is what we are to address. We are going to change it. Under no circumstances should you change anything else in this text box as it will cause errors and/or crashes in the front end of Homeworld. If no language is specified in the “HotKey” definition, it will default to and English-only hotkey. To specify the hotkeys for other languages, you could use the following syntax:
-
HotKey(English, T) – defines the hotkey for English. It would default to English without a language specified.
-
HotKey(Eng, T) – same.
-
HotKey(French, T) – defines the hotkey for French.
-
HotKey(Francais, T) – same.
-
HotKey(Fr, T) – same.
-
HotKey(German, T) – defines the hotkey for German.
-
HotKey(Deutch, T) – same.
-
HotKey(De, T) – same.
-
HotKey(Gr, T) – same.
\
In all these cases, the case is unimportant i.e. hotkey(GERMAN, T) is the same as hOtKeY(gErMan, T). You should choose a capitalization convention and stick to it, however. Consistency will make your changes easier for other people to understand.
\
So you can have an example, here is the text and user-defined information from the “German” button in the options menu. This button has been localized by us as a test of the localization pipeline.
\
\
\
\
Fig 5: Text strings and rectangle properties for “German” in 3 languages. (a) is the text string properties, (b) is the button rectangle properties.
\
\
Notice here how there is a separate line of text for each “HotKey” definition. This is very important.
\
Summary and 12-step program for localizing a text string and button.
So, here is a step-by-step process on localizing text strings and button hot-keys.
-
Load up the file in our example, Front_End_Tab.FEM.
-
Select the button/text you want to localize.
-
Select the text string.
-
Right-click, bring up the properties dialog.
-
Decide what the hot key will be in all languages.
-
Type in localized text strings.
-
Put an ampersand ‘&’ character before the hot-key letters.
-
Make sure you have the correct justification (centre for a button, right elsewhere), Click OK.
-
Right-click the button rectangle under the string, bring up properties.
-
Enter the localized “HotKey” lines to coincide with the ampersand hot key letters in the text string properties, Click OK.
-
Use Control –1,2,3 to check the justification and how it looks in all 3 languages.
-
Save the file.
\
A single FEMan file (.FEM) can have multiple game screens in it. For example, Front_End_Tab.FEM has the Main_game_screen, Quit_game, Select_tutorial and a number of other screens in it. Click on the named rectangles on the left of the pane splitter to choose your current screen. This is how you select what screen you are localizing.
\
For starters, we wish you to localize a few screens and send us back the .FEM file. We will then integrate these changes into the game and make sure our pipeline works properly. We do not want you to integrate your own changes into the game as it is rather complex and you would have no capacity to properly debug any problems that would come up. Furthermore, it is simple incremental testing to ensure the localization is working properly.
\
So, to begin with, we would like the following screens localized and the .FEM file sent back to us for testing:
-
Main_game_screen
-
Quit_game
-
Options_New
\
It should not take us more than a few hours to test your changes so there should be very little wait if we do the exchange by e-mail.
\
There are a few bugs in FEMan you should know about. The only one you need to know about is this: some times, on some machines, when FEMan loads, the window is off-screen. This is easily remedied by maximizing it, either by clicking Alt-Space, X or by creating a shortcut to run the program maximized. The other known problems are with getting the .FEM files into the game, which you will not be doing.
\
\
Luke Moloney
Lead Programmer, Homeworld
\