Skip to main content
Localization in Parley depends on a few steps, we’ll make the example with English but any of the following steps can be done with your own custom languages, see How To: Add a new language. After adding your own language(s), using them in Parley requires following a few rules.

Creating the Files

The file that you want to load must be placed in with the parley resource path Resources/{languageEnglishName}/{folderName}/{langCode}.{fileName}. For example Resources/English/SpaceshipLocker/en.Brad.

Populating the MetaData

To make Parley use your files semantically and be able to give you useful info about the loaded file, we populate the meta data for our conversation files, whether it is for YAML of Graph. See YAML MetaData.

Making the Conversation

Now write the conversation files in the native script of the language(s) you want to use, we’ll be using English and German as seen in the example below:
en.Localization
de.Localization
As you can see we set the language and text direction, in the next heading we’ll use this data in our script to change the UI.

Making the script

Parley handles text with direct string substitution, meaning that you just have to point it to the language and it will use it.

Wiring Things Up

Now connect things as we’ve done before, select the language from the inspector, and run to see the difference between each selection.