Ejemplo n.º 1
0
        public void GetTranslationFromSQL()
        {
            string[] keywords      = langDic.Keys.ToArray();
            string   keywordString = null;

            foreach (string keyword in keywords)
            {
                keyword.Replace("|", "\\|");
                if (keywordString == null)
                {
                    keywordString = keyword;
                }
                else
                {
                    keywordString = keywordString + "|" + keyword;
                }
            }
            SqlStoredProcedures sqlSP = new SqlStoredProcedures();
            string contextString      = sqlSP.LangGetTranslation(GetLangID(), "SL_MVC", keywordString);

            contextString = contextString.Replace("\\|", "\\"); //TODO: Add FULL support for \| escape
            string[] context = contextString.Split('|');
            for (int i = 0; i < keywords.Length; i++)
            {
                langDic[keywords[i]] = context[i];
            }
            taskAddKeyword.SetResult(true);
        }