zscript-doc/api/base/StringTable.md

20 lines
506 B
Markdown
Raw Permalink Normal View History

2018-12-29 16:05:19 -08:00
# StringTable
The localized string table as defined by `LANGUAGE`.
```
struct StringTable
{
2019-08-14 03:32:51 -07:00
static string Localize(string val, bool prefixed = true);
2018-12-29 16:05:19 -08:00
}
```
2019-08-14 03:31:41 -07:00
### `Localize`
2018-12-29 16:05:19 -08:00
2019-08-14 03:31:41 -07:00
Returns the localized variant of `val`. If `prefixed` is `true`, the string is
returned as-is unless it is prefixed with `$` where the `$` character itself is
ignored. **Not deterministic** unless there is only one variant of `val`. This
is generally fine because this should only be used for visual strings anyway.
2018-12-29 16:05:19 -08:00
<!-- EOF -->