The OpenD Programming Language

TranslationEngine

Represents a translatable string.

More...

Members

Functions

handleTemplate
void handleTemplate(tstring.TranslatableElement t)

If the translation engine has been set early in the module construction process (which it should be!)

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