github.com/iotexproject/iotex-core@v1.14.1-rc1/tools/iomigrater/common/lang.go (about) 1 package common 2 3 import ( 4 "os" 5 ) 6 7 // TranslateInLang Switch language output. 8 func TranslateInLang(cmdString map[string]string) string { 9 langEnv := os.Getenv("LANG") 10 switch langEnv { 11 case "zh_CN.UTF-8": 12 return cmdString["chinese"] 13 default: 14 return cmdString["english"] 15 } 16 }