Found a similar post here !
My decision is a little different, although I know the culture of the source and destination. Therefore, I can hard code the array of numbers.
string devYear = ""; string[] devD = { "реж", "рез", "реи", "рей", "рек", "рел", "рем", "рен", "рео", "реп" }; char[] digits = curYear.ToCharArray(); foreach (char ch in digits) { devYear += devD[int.Parse(ch.ToString())]; }
Another change is that I repeat year digits instead of devD. Saves several iterations, since most numbers will be less than 10 digits. In my case, only four digits.
Hope this will be helpful for someone stuck on similar lines.
source share