Game Development Reference
In-Depth Information
prefer to use all uppercase characters for keys to highlight the fact that it is a key, not an
actual string used by labels. Enter CREDITS_LABEL as the key.
When you are done editing, just close the window via the red X button in the upper left
corner.
Depending on whether your SpriteBuilder version automatically synchronizes the key
from the localization dialog with the label's text field, you may or may not have to edit the
Label text field. Enter CREDITS_LABEL in the Label text field if it contains any other
text. You'll notice that the label no longer changes to the text in the Label text field. That's
because the meaning of the Label text field changes when Localize is enabled. It becomes
the localized string's key.
You can quickly try out your localized string within SpriteBuilder. From the menu, select
Document View in Language German (de) to see the German version of this
screen. All localized labels with a corresponding German string will show up in German.
Those labels that have missing strings for the selected language will show the key instead.
This is another good reason to use all-caps text for keys or any other style to clearly dif-
ferentiate keys from actual strings. Figure 11-12 shows the menu screen with labels trans-
lated into German.
Figure 11-12 . The main menu with labels translated into German
As you can see in Figure 11-12 , two labels no longer fit because they run longer with Ger-
man text. This is just scratching the surface of why localization is difficult and time con-
suming, especially if it wasn't considered from the get-go. Although you can reduce the
credit label's font size in the German version, you'd have to do so in code. And that op-
tion is not suitable for the Settings button—if you made that label any smaller, you could
barely read the text anymore, if at all.
Search WWH ::




Custom Search