Difference between revisions of "Lang cds"
Imathrowback (Talk | contribs) (Created page with "The language files in RIFT are used for localization. They consist of a key which is used in other parts of RIFT and text for that key. == Files == There are language files...") |
Imathrowback (Talk | contribs) (→Files) |
||
Line 5: | Line 5: | ||
== Files == | == Files == | ||
− | There are language files for some of the supported languages. | + | There are language files for some of the supported languages, they can be found in the RIFT asset files. By default, only the language file associated with the chosen language in Glyph is downloaded and added to the assets. |
{|class="wikitable" | {|class="wikitable" | ||
Line 16: | Line 16: | ||
|- | |- | ||
|lang_russian.cds | |lang_russian.cds | ||
+ | |- | ||
+ | |lang_german.cds | ||
|- | |- | ||
|} | |} |
Revision as of 16:22, 9 May 2018
The language files in RIFT are used for localization.
They consist of a key which is used in other parts of RIFT and text for that key.
Files
There are language files for some of the supported languages, they can be found in the RIFT asset files. By default, only the language file associated with the chosen language in Glyph is downloaded and added to the assets.
Name |
---|
lang_english.cds |
lang_french.cds |
lang_russian.cds |
lang_german.cds |
A reference C# implementation to read this data can be found here: https://github.com/imathrowback/telarafly/blob/master/Assets/RiftAssets/EnglishLang.cs
Format
The language files have the following format:
Header
Bytes/Offset | Content | Comment |
---|---|---|
4 bytes | 32bit integer | Number of language text entries |
1024 bytes | byte | Huffman Frequency values |
Entries Offsets
Following the header is an array of entries up to the amount read in the header. Each entry is variable in length.
Bytes/Offset | Content | Comment |
---|---|---|
4 bytes | 32bit integer | Entry Key |
variable | LEB128 | LEB128 encoded integer that represents the offset of the entry in the file |
Entries
Following the entries offset table are the actual entries up to the amount read in the header, they are in the same order as the keys above.
Bytes/Offset | Content | Comment |
---|---|---|
variable | LEB128 | Encoded integer that represents the compressed size of the data stream |
variable | LEB128 | Encoded integer that represents the uncompressed size of the data stream |
variable | binary serialized data | Data that represents a language entry, this data is compressed and represents data encoded in the binary serialization format as most other RIFT data: DAT_Format |
To decompress the data you must use the frequency table read earlier to create a Huffman Reader: https://github.com/imathrowback/telarafly/blob/master/Assets/DatParser/HuffmanReader.cs