public string SerbianLatinToCyrillic(string rec) { Srpski slova = new Srpski(); foreach (KeyValuePair <string, string> pair in slova.getDictionary()) { rec = rec.Replace(pair.Value, pair.Key); // For upper case rec = rec.Replace(pair.Value.ToUpper(), pair.Key.ToUpper()); } return(rec); }
public static string ToSerbianLatin(this string rec) { //Dictionary<string, string> slova = new Dictionary<string, string>(); Srpski slova = new Srpski(); foreach (KeyValuePair <string, string> pair in slova.getDictionary()) { rec = rec.Replace(pair.Key, pair.Value); // For upper case rec = rec.Replace(pair.Key.ToUpper(), pair.Value.ToUpper()); } return(rec); }