File layout
This page explains how a translation file is structured and what components it normally consists of.
File Type
The file type is always .yml. This is a common file type for configuration files and is used to store translations.
File format
The file format is YAML. This is a human-readable data serialization standard that can be used in conjunction with all programming languages and is often used to write configuration files.
Key Value Pairs
It consists of a key value principle seperated by a colon.
key: value
String values
String values are always enclosed in double quotes. And are used for translations.
key: "This is a string"
List values
List values are always enclosed in square brackets. And are used for translations that go over multiple lines.
key:
- "Line1"
- "Line2"
...
Encapsulation
The Yaml format allows for encapsulation of keys. This allows for a better structure inside the file while keeping simple use for the developer.
Showing is simpler than explaining:
key:
subkey: "This is a string"
This key would be accessed by the developer as key.subkey.
This can be done as many times as needed.
otherKey: "I am normal"
key:
anotherKey: "Hello I am encapsulated one time"
subkey:
subsubkey: "This is a string encapsulated two times"