localizedKey

Construct localized key name from key and locale.

  1. string localizedKey(string key, string locale)
    @safe pure nothrow
    string
    localizedKey
    (
    string key
    ,
    string locale
    )
  2. string localizedKey(string key, string lang, string country, string modifier)

Return Value

Type: string

localized key in form keylocale. Automatically omits locale encoding if present.

Examples

assert(localizedKey("Name", "ru_RU") == "Name[ru_RU]");
assert(localizedKey("Name", "ru_RU.UTF-8") == "Name[ru_RU]");

See Also

separateFromLocale

Meta