using System.Collections.Generic;
public static void Main()
var englishResources = GetAllResourceValues(1);
var arabicResources = GetAllResourceValues(2);
var merged = englishResources.ToDictionary(
i => new LanguageResourceModel {
EnglishValue = i.Value.Value
LanguageResourceModel found;
foreach (var item in arabicResources)
if (merged.TryGetValue(item.Key, out found))
found.ArabicValue = item.Value.Value;
merged[item.Key] = new LanguageResourceModel {
ArabicValue = item.Value.Value
merged.Values.ToList().ForEach(i => Console.WriteLine($"{i.Name}, English={i.EnglishValue}, Arabic={i.ArabicValue}"));
public static Dictionary<string, KeyValuePair<int,string>> GetAllResourceValues(int languageId){
return new Dictionary<string, KeyValuePair<int, string>> {
{"one", new KeyValuePair<int,string>(1, "one") },
{"two", new KeyValuePair<int,string>(1, "two") },
{"three", new KeyValuePair<int,string>(1, "three") },
return new Dictionary<string, KeyValuePair<int, string>> {
{"one", new KeyValuePair<int,string>(1, "uno") },
{"four", new KeyValuePair<int,string>(1, "quatro") },
public class LanguageResourceModel{ public string Name, EnglishValue, ArabicValue; }