Search public documentation:
The Unreal Engine primarily relies on localized text files to display text in a given language. Configuration is determined by key-value pairs, arranged in sections. One or more values can be associated with a given key. The language can be changed by setting the Language variable in your game project's Engine configuration file to the specified language, which correlates to a localization directory. For example, this is how you would set the language to Japanese:
[Engine.Engine] ... Language=jpn ...
The UnrealLoc tool has been written to manage localized text in the engine; it handles the more mundane tasks.
Localization in UE3 is handled with a series of localized text files in the
[Section] Key=ValueFor instance, if you have a script package called MyGame.u, there should be a MyGame.int containing all of the default localized strings for the script classes in MyGame.u. So, if you have a script class called MyHUD.uc, with localized string properties
LoadingString, one of the sections in MyGame.int would be:
[MyHUD] CheckpointReachedString=Checkpoint Reached LoadingString=LoadingOne of the things to keep in mind about this section is that it needs to be created by hand. UnrealScript will not allow you to specify a default string for a localizable property in the
defaultpropertiessection of the UnrealScript class. If you try, the script compilation will fail. This is actually a good thing because it forces you to be aware of the strings that must be translated and get them into the localized text file as soon as possible. Generic Browser on the packages. This will auto-generate localized text files on a per-package basis with the necessary text. Be careful: anything you enter in a property window will be overwritten by the INT contents the next time you load the package/map. You'll need to re-xport loc files before terminating the editor session.
LoadingStringproperties even if multiple instances of the class exist. What happens if you create a class that needs to have different designer-specified localizable text for each instance? For example, if you are using archetypes as a system to build weapons, each of them might need a localized name and description. In this case, the class with the localizable string properties needs to be marked as
perobjectconfigin its definition. By doing this, running the Full Loc Export... on packages containing objects of that class will output individual strings for each instance of the class. So, for instance, if you have a package called VO.upk with three WAV files in it (WAV1, WAV2, WAV3), each with a filled-in SpokenText field, running Full Loc Export... on it will generate a localized text file called VO.int with these sections in it:
[WAV1 SoundNodeWave] SpokenText="<WAV1 Text, whatever that may be>" [WAV2 SoundNodeWave] SpokenText="<WAV2 Text, whatever that may be>" [WAV3 SoundNodeWave] SpokenText="<WAV3 Text, whatever that may be>"Notice that the section names include both the resource name and its class. This, coupled with the filename VO.int, should specifically address all of the localized strings in VO.upk.
[GenericStrings] Output="Line 1/nLine2/nLine 3"Would return this:
Line 1ine2ine3Previewing the string within the UI Editor DataStore Browser? will also yield the same. However, modifying a single localized string and applying changes within the UI Editor DataStore Browser? appears to automatically remove any quotes surrounding the strings in the entire INT file affected. This will cause the escape characters to work as expected. Solution: If you're manually entering localized strings into an INT file with a text editor, do not use quotes! This is the proper declaration: [GenericStrings]
Output=Line 1/nLine2/nLine 3Which will yield the following:
Line 1 Line 2 Line 3
localizedkeyword will be available for export and will therefore will be in the associated localized text file. For example, the following example class declares that its strings will be exported to the MyGame.int localized text file:
class MyHUD extends HUD var localized string CheckpointReachedString; var localized string LoadingString;See the UnrealScript Reference for more information on localized strings.
Localized text files are located in the Localization directory of a given project, in language-specific subdirectories Here is a list of localized text files available with a given project using the Unreal Engine:
.int (project name)
Editor.int (if editor changes are made in your project)
UI.int (for UI)
Content.int (for binary content)
Credits.int (for credits)
Subtitles.int (for subtitles)