Documentation menu

Format reference

I18n

Translations are a plugin: list i18n = "v1" in Versions to use them. The I18n block names the language the story files are written in and every locale the story is translated into.

Schema

OSF.osf source
story.osf
Story demo {
  name = "Demo"
}

I18n {
  source = Eng                               // language the story files are written in
  Locale Rus "Russian"  { enforce = true }   // missing translations are errors
  Locale Jpn "Japanese"                      // missing translations fall back to Eng
}
plugins/i18n.yaml
apiVersion: i18n/v1
kind: Configuration
data:
  source: Eng
  locales:
    Russian:
      id: Rus
      enforce: true
    Japanese:
      id: Jpn
      enforce: false

Fields

.osfYAML / JSONValue
sourcesourceLocale id the story files are written in.
Locale <id> "<name>"locales.<name>.idA locale id: three letters, capitalised (Eng, Rus, Jpn).
enforce = trueenforcetrue: a missing translation is an error. false (the default in .osf): a warning, and the game falls back to the source text.