From 1e52b37e7b820a60a7294b1a1b5ce8f2f4055a87 Mon Sep 17 00:00:00 2001 From: Shaz hemani Date: Mon, 1 Jun 2020 00:00:18 +0500 Subject: [PATCH] functions to perform turk to eng --- main.go | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 main.go diff --git a/main.go b/main.go new file mode 100644 index 0000000..ad3c342 --- /dev/null +++ b/main.go @@ -0,0 +1,51 @@ +package main + +func main() { + langHashMap := make(map[string]string) + populateLanguageHash(langHashMap) +} + +func convertColumnItemsTurkeyToEng(row []string, langHash map[string]string) { + for i, item := range row { + if value, ok := langHash[item]; ok { + row[i] = value + } + } +} + +// code not working now, rune needs to be fixed +func populateLanguageHash(langHash map[rune]string) { + langHash["Dönem"] = "period" + langHash["OCAK"] = "january" + langHash["ŞUBAT"] = "february" + langHash["MART"] = "March" + langHash["1. DÖNEM"] = "1st Quarter" + langHash["NISAN"] = "April" + langHash["MAYIS"] = "May" + langHash["HAZIRAN"] = "June" + langHash["2. DÖNEM"] = "2nd Quarter" + langHash["TEMMUZ"] = "July" + langHash["AĞUSTOS"] = "August" + langHash["EYLÜL"] = "Sepember" + langHash["3. DÖNEM"] = "3rd Quarter" + langHash["EKIM"] = "October" + langHash["KASIM"] = "November" + langHash["ARALIK"] = "December" + langHash["4. DÖNEM"] = "4th Quarter" + langHash["2020 YILI"] = "2020 year" + langHash["2019 YILI"] = "2019 year" + langHash["2018 YILI"] = "2018 year" + langHash["2017 YILI"] = "2017 year" + langHash["2016 YILI"] = "2016 year" + langHash["2015 YILI"] = "2015 year" + langHash["2014 YILI"] = "2014 year" + langHash["2013 YILI"] = "2013 year" + langHash["2012 YILI"] = "2012 year" + langHash["2011 YILI"] = "2011 year" + langHash["İşlem Adedi"] = "Number of transaction over period" + langHash["İşlem Tutarı (Milyon TL)"] = "Volumn of transactions (Million TL)" + langHash["Alışveriş"] = "Purchase" + langHash["Nakit Çekme"] = "Cash" + langHash["Toplam"] = "Total" + // langHash[""] = "" +}