我试图通过一种动作方法从Json返回一个字符串响应,并在吐司消息中显示它,甚至以为应用程序的Culture设置为西班牙语,但它以英语返回文本。下面是我的代码
public ActionResult Search(string keyword)
{
//Search query and return records.
//if no record found return Json response with info localized text
return Json(new {response = LocalizedText.No_Record_Found_Message}, JsonRequestBehavior.AllowGet);
}
如果有人知道如何实现它,请发表您的答案,谢谢