string getReourseFileAsJSON(String resourceFileName)
{
try
{
string mapResString = "localizedString={'userLang':'" + m_UserInfo.UserLanguge + "',";
ResXResourceReader rsxr = new ResXResourceReader(
String.Format("{0}{1}\\{2}", System.AppDomain.CurrentDomain.BaseDirectory.ToString(), "App_GlobalResources", resourceFileName));
foreach (DictionaryEntry d in rsxr)
{
mapResString += "'" +
d.Key.ToString() + "':'" + d.Value.ToString() + "',";
}
mapResString += "};";
return mapResString;
}
catch
{
return "File Not Found";
}
}
No comments:
Post a Comment