Function translationContext

Annotates an interface method or class with translation information.

The translation context contains information about supported languages and the translated strings.

Prototype

TranslationContextAttribute!CONTEXT translationContext(CONTEXT)();

Example

struct TranslationContext {
	import std.typetuple;
	alias languages = TypeTuple!("en_US", "de_DE", "fr_FR");
	//mixin translationModule!"app";
	//mixin translationModule!"somelib";
}

@translationContext!TranslationContext
class MyWebInterface {
	void getHome()
	{
		//render!("home.dt")
	}
}

Authors

Copyright

License