Skip to reading
Game Translations

18. Regional languages, fonts and layout

Edition 0.86.4.3

0.86.4.3 edition with revised lessons, updated cross-references and new cinematic/camera-safety supplements. Earlier examples, screenshots and registry figures retain their stated edition context.

Download PDFView PDF page
On this page

BASIC#

Code example
FUNCTION Run()
    AWAIT SetGameLanguage({"language": "fr", "persist": true})
    AWAIT ChangeVoiceLanguage({"language": "auto"})
END FUNCTION

Lua#

Code example
local Script = {}
function Script.run()
    await(SetGameLanguage({language = "fr", persist = true}))
    await(ChangeVoiceLanguage({language = "auto"}))
end
return Script

These use the shared action names and property names. Their punctuation and waiting syntax depend on the scripting language.

The dedicated voice/subtitle actions update the running options, but do not by themselves promise a saved preference. The built-in Options menu's Apply Options saves the combined choices. If you use custom controls, arrange their persistence deliberately; do not assume a previous SetGameLanguage call saved voice changes made afterward.

For spoken-message actions, enter the original source sentence, then the appropriate Voice Key or explicit audio route. Do not switch the source sentence to French inside every branch of the script; let the translation table handle the language choice.

Use a base translation where it helps#

A regional code can fall back to its base. For example, a lookup for fr-ca can use fr text if there is no Canadian French override for that source.

1. Add fr and translate a sentence.

2. Add fr-ca with a clear name such as French (Canada).

3. Leave the Canadian French box empty for a line that can share the base translation.

4. Add a regional translation only where the wording needs to differ.

5. Register fr-ca before trying to select it through Set Game Language.

Page 42 of 50Permalink
Go to page