Documentation menu

Format reference

I18n

Translations are a plugin: list i18n = "v1" in Versions to use them (OSF105 without it). The optional I18n block, at most one per project, 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 # language the story files are written in
  locales:
    Russian: # missing translations are errors
      id: Rus
      enforce: true
    Japanese: # missing translations fall back to Eng
      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; OSF301). A locale listed twice is OSF302.
enforce = trueenforcetrue: a missing translation is an error. false (the default in .osf): a warning, and the game falls back to the source text.