static IEnumerable <string> SearchChainRecursive(LocaleIdentifier id) { foreach (var locale in id.SearchChain()) { yield return(locale); if (ParentLocales.Value.ContainsKey(locale)) { var parent = LocaleIdentifier.Parse(ParentLocales.Value[locale]); foreach (var p in SearchChainRecursive(parent)) { yield return(p); } yield break; } } }