Non-localized key.
Locale in intereset.
Allow fallback to non-localized version.
The localized value associated with key and locale, or the value associated with non-localized key if group does not contain localized value and nonLocaleFallback is true. Note: The value is not unescaped automatically.
auto lilf = new IniLikeFile; lilf.addGenericGroup("Entry"); auto group = lilf.group("Entry"); assert(group.groupName == "Entry"); group["Name"] = "Programmer"; group["Name[ru_RU]"] = "Разработчик"; group["Name[ru@jargon]"] = "Кодер"; group["Name[ru]"] = "Программист"; group["Name[de_DE@dialect]"] = "Programmierer"; //just example group["Name[fr_FR]"] = "Programmeur"; group["GenericName"] = "Program"; group["GenericName[ru]"] = "Программа"; assert(group["Name"] == "Programmer"); assert(group.localizedValue("Name", "ru@jargon") == "Кодер"); assert(group.localizedValue("Name", "ru_RU@jargon") == "Разработчик"); assert(group.localizedValue("Name", "ru") == "Программист"); assert(group.localizedValue("Name", "ru_RU.UTF-8") == "Разработчик"); assert(group.localizedValue("Name", "nonexistent locale") == "Programmer"); assert(group.localizedValue("Name", "de_DE@dialect") == "Programmierer"); assert(group.localizedValue("Name", "fr_FR.UTF-8") == "Programmeur"); assert(group.localizedValue("GenericName", "ru_RU") == "Программа"); assert(group.localizedValue("GenericName", "fr_FR") == "Program"); assert(group.localizedValue("GenericName", "fr_FR", No.nonLocaleFallback) is null);
Perform locale matching lookup as described in Localized values for keys.