Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Overview of the Localization System

CryENGINE is able to localize text and sound. All of the necessary localization data is stored inside a pak file, named after the Game/Localized folder (for example: Game/Localized/english.pak). The structure of these pak files is the same for each language. Inside of the pak files all files contained in the Languages folder can be directly translated except dialog_recording_list.xml and ai_dialog_recording_list.xml. These two files are used by the dialog system and need further explanation.

The g_language console variable can be used to load a specific language, which is addressed by the name of the language pak file (for example, english for english.pak). The dialog recording lists as well as translated text are loaded and handled by the LocalizationManager class. Make sure that new files are correctly loaded in the CSystem::OpenLanguagePak() function.

CryENGINE 3.4.3

From CryENGINE 3.4.3 and on the localization files have moved from Root/Game/Localized to Root/Localization. Also note the PAK layout has changed. The dialog folder with the audio files is located in the English.pak and the XML and gfx font files are located in the English_xml.pak.

There is a small difference in the PAK and folder structure as well. When you don't use the pak files but original assets(xml files in a folder structure) you need to make sure you copy the files of the language of choice to Root/Languages/.

PAK structure:

Root

..

Localized

..

..

English.pak

..

..

English_xml.pak

Folder structure:

Root

..

Localized

..

..

English

..

..

..

text_ui_warnings.xml

..

..

..

dialog folder

..

..

..

etc

..

..

German

..

..

..

text_ui_warnings.xml

..

..

..

dialog folder

..

..

..

etc

..

..

Korean

..

..

..

text_ui_warnings.xml

..

..

..

dialog folder

..

..

..

etc

..

..

text_ui_warnings.xml

..

..

dialog folder

..

..

etc

For backwards compatibility reasons you can set the sys_localization_folder cvar to "Languages" to use the old system. In 3.4.3 it is set to "Localization" by default which will make it use the new structure.

Translating Spoken Text

As the XML files mentioned above contain all the text that is spoken in a game, they can be very large and are best viewed inside spreadsheet software, such as Excel. Inside the files, each line represents sentences spoken by a character. A detailed description of single parameters of these lines can be found in The Dialog System. Sentences spoken by different characters can be composed to a dialog by the Dialog Editor as an additional step, for further use in Track View scenes or Flow Graphs.

The AUDIO_FILENAME row, which is also called sound-key, is a unique identifier for spoken sentences. It directly references the audio file in the dialog folder, with the Languages folder and the file extension being skipped. This sound-key can be copied into the Dialog Editor or any dialog sound field, because it is a valid sound name. There are two different files needed for each line specified in the XML table, which are automatically loaded by the engine; one optional and one mandatory.

  • .FSQ - This file contains the facial animation data, applied to the character that is speaking. It must be generated in the Facial Editor, depending on the audio source. To speed up the translation process, these files may be taken as a basis for lip synchronization and taken over without any change. Dialog lines that are spoken offscreen do not need the FSQ file.
  • .WAV, .MP2, or .MP3 - This file contains the audio source. Its extension must be consistently of only one format as the engine allows for setting up the decoding mechanism globally (by the s_Compression console variable). For example, even if a sound is referenced to use the WAV extension internally, the MP2 file will be loaded if s_Compression is set to 2. Ideally, all dialog references should point to WAV files. If so, the compression of choice can be selected and easily changed.

In the simplest case, translating the audio data is just a matter of translating the audio files contained in the structure described above.

Texture Localization

For detailed information on localizing textures, refer to the Texture Localization article.

  • No labels