.json‐Language‐Files - Fi0x/LanguageGenerator GitHub Wiki

How they work

To save a language locally, a user can download the properties of the language from the web-server. These properties are provided in a .json-file.

Structure

Content

  • nameLengths: A list of size 2. First value is the minimum length a word must have, second value is the maximum length a word can have.
  • specialCharacterLengths: A list of size 4. First value is the amount of characters, that a word needs to have, before a special character can appear. Second value is the minimum amount of characters, that a word needs to have, after a special character occured. Third value is the minimum amount of special characters that need to be in each word. Fourth value is the maximum amount of special characters a word can have.
  • specialCharacterChance: The probability from 0.0 to 1.0, that a word has a special character.
  • vocals, consonants, vocalConsonant, consonantVocals: The combinations of letters, that can be used to build a word.
  • forbiddenCombinations: These combinations will never appear in a word.
  • specialCharacters: A list of possible special characters, that could be added within a word.
  • startingCombinations: If not empty, a random combination from this list will be used for the beginning of every word.
  • endingCombinations: If not empty, a random combination from this list will be used at the end of every word.

Example

{
  "nameLengths": [
    1,
    2
  ],
  "specialCharacterLengths": [
    0,
    1,
    2,
    3
  ],
  "specialCharacterChance": 1.0,
  "vocals": [
    "a"
  ],
  "consonants": [
    "d"
  ],
  "vocalConsonant": [
    "an"
  ],
  "consonantVocals": [
    "da"
  ],
  "forbiddenCombinations": [
    "aa"
  ],
  "specialCharacters": [
    "`"
  ],
  "startingCombinations": [
    "f"
  ],
  "endingCombinations": [
    "m"
  ]
}