mirror of
https://github.com/tonytins/cstdotnet.git
synced 2025-10-16 01:03:38 -04:00
UIText class
The UIText class allows for travseing in "/<directory>/<language>.dir" directories and searching for CST files by their Id number. See usage.md for more info.
This commit is contained in:
parent
86ed534870
commit
0ff7bb68c4
22 changed files with 289 additions and 170 deletions
25
README.md
25
README.md
|
@ -6,30 +6,7 @@ Caret-Separated Text (or CST) is a key-value pair format represented by digits o
|
|||
|
||||
## Usage
|
||||
|
||||
```text
|
||||
1 ^The quick brown fox jumps over the lazy dog.^
|
||||
```
|
||||
|
||||
```csharp
|
||||
#r "nuget:CSTNet,1.0.2"
|
||||
using System;
|
||||
using System.IO;
|
||||
using CSTNet;
|
||||
|
||||
var file = File.ReadAllText("example.cst");
|
||||
var example = CaretSeparatedText.Parse(file, 1);
|
||||
|
||||
Console.WriteLine(example);
|
||||
```
|
||||
|
||||
See working example on [.NET Fiddle](https://dotnetfiddle.net/ecKb2h).
|
||||
|
||||
In production, CST files were used in The Sims Online (TSO) to provide translations. Each translation was split into their respective directories:
|
||||
|
||||
- ``uitext/english.dir/_154_miscstrings.cst``
|
||||
- ``uitext/swedish.dir/_154_miscstrings.cst``
|
||||
|
||||
Sixam.CST only provides the basic parsing functionality.
|
||||
See [usage.md](./usage.md).
|
||||
|
||||
## To-do
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue