localizedKey

ditto, but constructs locale name from arguments.

  1. String localizedKey(String key, String locale)
  2. String localizedKey(String key, String lang, String country, String modifier)
    @safe pure
    String
    localizedKey
    (
    String
    )
    (
    String key
    ,
    String lang
    ,
    String country
    ,
    String modifier = null
    )
    if (
    isSomeString!String &&
    is(ElementEncodingType!String : char)
    )

Examples

assert(localizedKey("Name", "ru", "RU") == "Name[ru_RU]");
assert(localizedKey("Name".dup, "ru".dup, "RU".dup) == "Name[ru_RU]".dup);

Meta