The OpenD Programming Language

tstring

Represents a translatable string.

More...
class tstring {
static __gshared
TranslatableElement* first;
}

Constructors

this
this(InterpolationHeader hdr, Args args, InterpolationFooter ftr)

For a case where there is no plural specialization.

Detailed Description

This depends on interpolated expression sequences to be ergonomic to use and in most cases, a function that uses this should take it as tstring name...; a typesafe variadic (this is also why it is a class rather than a struct - D only supports this particular feature on classes).

You can use null as a tstring. You can also construct it with UFCS: i"foo".tstring.

The actual translation engine should be set on the application level.

It is possible to get all translatable string templates compiled into the application at runtime.

Meta

History

Added June 23, 2024