Token

Translation tokens are a localization mechanism.

When an RPC reply wants to express something in natural language, it uses tokens. These are simply namespaced strings which are meant to be looked up by a client and translated into its human user's preferred language. The namespace defines where a client should go to seek a translation table.

You typically translate a list of tokens, not just a single token. The first token in the list may have a translation which has interpolation points. (E.g., "The \1 is inside the \2.") The translator fills these points in with the translations of the following tokens. It is an error for the list to be too short. (E.g., in this example, there would have to be at least two tokens after the first.)

Interpolation points may occur out of order, or more than once. (A Yodaspeak translation of the token described above might be: "Within the \2 the \1 resides. Seek the \2, mmm?")

Namespaces

Tokens are namespaced, using the same dot notation that Volity's RPC Requests use.

The first token in a list must have a namespace. Following tokens may omit the namespace; if a token lacks a dot, it is assumed to be in the same namespace as the first token.

The namespaces that Volity supports includes:

volity
Tokens defined by the platform's core spec, and supported by every compliant client application.
game
Tokens defined by a particular ruleset. A compliant UI file for that ruleset will contain localization files which translate these tokens.
seat
Defined just like the "game" namespace, but the value is always a seat id.
ui
Defined and used within a UI file. They are not specified by the ruleset, and the referee does not send them. Like the "localization_files.html" class=wikipagelink>localization files. However, they are used only in UI localize() calls.
literal
The text after the "literal." is copied literally. (This text may include dots, backslashes, or other funny characters. There is no backslash-escaping, or any other kind.)

How are these tokens translated?

See RPC Replies for a list of volity.* tokens, and their English translations.

The game.*, seat.*, and ui.* tokens are translated via localization files loaded in from the game's UI file.