1.6 KiB
I18N-System
The TeaSpeak web and native client are supporting a farly rich amount of different languages.
This is possible due to the integrated translation system.
The goal of this paper is to give a brief overview of the functionality.
1. Structure of the system
TeaSpeaks translation system is a map based system.
This means that in general every visible text will be looked up
and if there is a mapped value it will uses this instead of the original text.
For example, if we have tree phrases and the following mapping:
Mapping:
Hello, World
=> See you soon
Foo
=> Bar
Messages
Hello, World
becomes: See you soon
Hello world
has no mapping so: Hello world
Foo
becomes => Bar
Foo Bar
has no mapping so: Foo Bar
The files which contain these mappings are ending with .translation
(Structure described in 1.1).
This means that for each language or dialect you want to adjust, you require a new translation file.
To actually use a translation file you'll need to register the file in a so called "translation repository".
A translation repository could provide multiple translation files or even multiple versions of the same file.
The structure of a "translation repository" is described in 1.2.
The web an the native client will query all registered translation repositories for their translation files.
If the client then selects one of the queried translations, the given mapping of the file will be used to map all visible texts.
1.1 The .translation
file
The .translation
file contain in json
format the all mapping information.