Strings.opDispatch

Get the text for id according to the user's preferred language(s).

  1. template opDispatch(string id, string file = __FILE__, uint line = __LINE__)
  2. template opDispatch(string id)
  3. I18NString opDispatch [@property getter]
    struct Strings()
    version(D_Ddoc)
    @property pure nothrow @safe @nogc static
    opDispatch
    (
    string id
    )
    ()

Parameters

id

identifier of string resource (the name attribute)

Examples

void main()
{
    import std.stdio, i18n.text;
    writeln(strings.hello_world); // Default encoding
    writeln(strings.getEncoded!("hello_world", wstring)); // UTF-16
}

Meta