ASP.net MVC 多语言处理
MVC多语言处理主要分两部分,一部分是Razor视图中的文字标签内容切换, 另一部分是javascript文件中的文标签内容切换. 这里分这两部分来说.
View视图中的比较好做, 思路是使用资源文件.
一, 新建一个资源文件类, 完成之后结构为:
没有后缀的是默认的主文件, .zh和.en-US是两个语言包. 我这里默认为中文
Resource.resx:
Resource.zh.resx:
Resource.en-US.resx:aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAf4AAACJCAIAAABCXc2/AAAgAElEQVR4nO2dfVQU15ru38ViMbCODsOIx8vRRL06xqtHdESjclWMQ8To6KAiilxRDOP3qJ3xiyW60HP9GIPjSS/iUk5kOEY5GK8hR2U0coyIRwMiGlBQjEDz3aBNf1JdVFft9/7R3YDQ3TRGaYT3t54/dPdm76piP0/XripqAwCkpKRotVojL7xVpaSkIEEQbxOdTufqTSDeDYCinyB6DRT9hJP0vOiXXlw7mvJIJzm3/Yxv+LmSkxClFxm749OfG5z8OYLojWi1WscVmD4/+dxDtcgQEVH4OTE+Ja+hmXXDphE9ix4X/UL5wQ8ABoV/UyNYxiOTRKnD0JT4l8/vpO1fEdAPoP+SyyqT+kowgNf8NKX4Zg8QQbxDdBb9TJ8V6g6+4ReVJkRE/kGEB4w58IhjiCjxBoG+A/oMPSz6JfX3i70AAj47dS7VzLlTOwKHBO69o7Kcp6Ckur7l44Bx4wL8BwKM2nIu60FJRYNede0TN7c5F19aTvoZr3zeQOOY6Gt0Ev3MkB3uBYOWfn7G7K7TO8YBTNh1OjU19Y+fL3u/36T9D2je3EfoUdHPdLfXDHIfL/vjpSsWvkve8AGA27T4W8r2QW5S7B/hFfojxxCRaa7NcwO3D2Z9Mm/evHnz5s2dOQJgYNS1lzQFIPoUGo3GwadMc22e56C12U++//LYqdT0K5dTd40Fj9lHLl65cuXy5ctXrlzJyCpx9lor8W7Tc6KfCTVnP/ECr/mpFbwl5cWGy8t8wDfqhlpqU01do1AoFIpn19f6uU2J37982Yni50nTBsxOLq2+k3A0vbhBU3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gpFa31g9NHK1kulTJsRDBCY9kJoyFg72tyAh3/k7jUjHQ9KFG3XZ9oflvUH8B41bsyo4YPNmzTlWLnAkBlLU2Mm9m/Zeu/ZJ6vFXjYoideGXEYucxKAnvkiByYJnIFruS3f9hORN+gNtj55M3Rsn3H5W4cABJywdVvMdgt6XZPg9DNfHeuLikOjAGZdtDwRjYIiYSzA2ONVYpsf0er0nNCL1gol3gDkMufr93GX9dTo7xFITWW5Wd+f2TnDE2DCkWfddyffVBY/HOD9T8/lligqFM/yLsjGA/htLaS3oRCOIZc5Tx93GUW/A4TSuKEA4DUuIvFB9/7VHuOepsRMHWidb3qNWbjvWnVz3xiSxC+AXNYF+rbLKPodwSRRdOVkj4kCzze/tVk30esgl71G/33TZRT9BNF7IJcRTuJU9Iui1KkkSRLNai0UTaJoEkWKfoLoHshlhJP8f0l6WD3qLCiMAAAAAElFTkSuQmCC" alt="" width="307" height="81" />
这里一定要记得把这三个资源的修饰符修改为public :aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlcAAABRCAIAAABwnxTnAAATUklEQVR4nO1d32scxx3X3xLy4DS581nWDydtKEGxSkrsBMJyiYoJxpExjhNQaMz6qrhPxgYTQ1H8sIeJGkof6mLTF3nPfqqNoX1Igmm7SoQJFXVx/JAWrRQ5SvOgPszu7PyendXd7Z328+GDkffu5ma+M/P9zPc7s7cjtVoDBEEQBKvJkdJrAIIgCIJlESoIgiAIVpcjI61PQbAslj4BQBCsOKGCYJksfQKAIFhxQgXBMln6BABBsOKECoJlsvQJAIJgxQkVBMtk6RMABMGKEyoIlsnSJwAIghUnVBAsk6VPABAEK05BBb+49M12hm8ejZftJYeDlx/d3147ll1ZXdreXrquMOn9u1+UX9tBIj8cm0EUZ4jaXtnToyQ2gygO/dKrMSzEsKkY/U73erkZRLFCBVNP/cWlb7a3V1ZLd5RDQK0KDrEN7z3cdP3IiT+t3nu4eeJPq9aLlPKIjIIm/TsOW+VPuRIIFXQ2F4ZNhdhHFfx0/O4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oWOltHCiOrAEAAAClYv3Onc2PPno8N/f91FQvlI/wf1NT6zdulN3WgQNUEAAAoN+IV1Y2rl59fOHC1sxM72SP5dbx42sPHpTd7kEEVBAAAKAf6E/Ap+TmRx+V3frBBVQQAACgJ1j/7LONq1c35+f7FvDJ/P6VV9bv3CnbEgMNqCAAAECX8OABCfi2jh/vdcD3v6mprdnZxx98sLmwsLG0tH779tra2tbhw+x7vpubQxbUCqggAABAcfQh4Pv+lVe2Zmcfnz+/ubCwfvv2+mef6SqzefYs/dS3i4v9tMPwAioIAADggl4GfFtvvLE1O7u5sPDt4uL67dvxyopT1TauXv3hwIHvZmYMSgkIgAoCAABY0IuAb2t29ru5uc2FhW//+Mf127e7krqMv/xyc34eWVAnQAUBAAAkPHiwceMGCfh6sYEHDA6gggAAAGtrJOBbXNycnxfOmPRiAw8YHEAFAQCoKnYQ8O1wAw8YHEAFAQCoEAoEfL3YwAMGB1BBAAB2M+KVlZwBHzbwqgmoIAAAuw3rd+5sLC4+npvTBXzYwAMooIIAAAw9SMD3+MIFOeDDBh5gBlQQAIChB7lbHBt4QAFABQEAAIDqAioIAAAAVBdQQQAAAKC6gAoCAAAA1QVUEAAAAKguoIIAAABAdQEVBAAAAKoLBxUcAQAAAIDdhf8DYBtkA7fDYcIAAAAASUVORK5CYII=" alt="" />
到此为止, 我们的资源包已经建立完了,如果还有其它的字段,往这三个资源文件里添加就可以了.
二, MVC View层中的的切换链接代码:
@{
string controller = ViewContext.Controller.ValueProvider.GetValue("controller").RawValue.ToString();
var action = ViewContext.Controller.ValueProvider.GetValue("action").RawValue.ToString();
}
@Html.ActionLink("中文", action, new{Controller = controller, lang = "zh"})
@Html.ActionLink("english",action,new{Controller = controller,lang="en-US"})
我的需求是在登录页中加入切换链接,每次需要退出切换语言后再登录.
运行效果为:
public ActionResult Login(string lang)
{
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(lang);
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
return View();
}
然后在View层中的中文名称就可以使用资源文件替换了:
<div class="form-group">
<div class="input-group input-group-lg" style="border-radius: 22px;">
<span class="input-group-addon">
<i class="glyphicon glyphicon-user"></i>
</span>
<input type="text" class="form-control" id="username" name="UserName" placeholder="@Resources.Resources.UserName" data-content="@Resources.Resources.InputUserName">
</div>
</div>
<div class="form-group">
<div class="input-group input-group-lg">
<span class="input-group-addon">
<i class="glyphicon glyphicon-lock"></i>
</span>
<input type="password" class="form-control" id="password" name="Password" placeholder="@Resources.Resources.Pwd" data-content="@Resources.Resources.InputPwd">
</div>
</div>
切换效果如下:
三, JS文件的多语言切换
对于js文件我目前使用的是创建两个语言的js文件,
使用方法为:
在cshtml里引用js文件时,判断一下当前的语言环境:
@{
if (Thread.CurrentThread.CurrentUICulture.Name == "zh")
{
<script src="~/Scripts/view/supplierList.js"></script>
}
else
{
<script src="~/Scripts/view/supplierList-EN.js"></script>
}
}
至此为止项目中所有需要切换语言的地方都可以切换了. 有不懂的M我
ASP.net MVC 多语言处理的更多相关文章
- EF+LINQ事物处理 C# 使用NLog记录日志入门操作 ASP.NET MVC多语言 仿微软网站效果(转) 详解C#特性和反射(一) c# API接受图片文件以Base64格式上传图片 .NET读取json数据并绑定到对象
EF+LINQ事物处理 在使用EF的情况下,怎么进行事务的处理,来减少数据操作时的失误,比如重复插入数据等等这些问题,这都是经常会遇到的一些问题 但是如果是我有多个站点,然后存在同类型的角色去操作 ...
- ASP.NET MVC 多语言方案
前言: 好多年没写文章了,工作很忙,天天加班, 每天都相信不用多久,就会升职加薪,当上总经理,出任CEO,迎娶白富美,走上人生巅峰,想想还有点小激动~~~~ 直到后来发生了邮箱事件,我竟然忘了给邮箱密 ...
- ASP.NET MVC 多语言实现——URL路由
考虑实现一个完整的基于asp.net mvc的多语言解决方案,从路由到model再到view最后到数据库设计(先挖好坑,后面看能填多少). 我所见过的多语言做得最好的网站莫过于微软的msdn了,就先从 ...
- ASP.Net MVC多语言
.NET MVC 多语言网站 通过浏览器语言首选项改变MVC的语言,通过浏览器语言选项,修改脚本语言. 一.添加资源文件 1.添加App_GlobalResources文件夹. 2.添加默认的资源文件 ...
- ASP.NET MVC多语言 仿微软网站效果(转)
本文转自: https://blog.csdn.net/Cooldiok/article/details/7831351 2017年10月22日 21:31:22 Cooldiok 微软作为ASP.N ...
- ASP.NET MVC多语言 仿微软网站效果
文章转载自:https://blog.csdn.net/cooldiok/article/details/78313513 微软作为ASP.NET的创造者,它对于官网的结构设计肯定有值得我们借鉴和参考 ...
- ASP.NET MVC 多语言实现技巧 最简、最易维护和最快速开发
说说传统做法的缺点 1.做过多语言的都知道这玩意儿太花时间 2.多语言架构一般使用资源文件.XML或者存储数据库来实现.这样就在一定程序上降低了性能 3.页面的可读性变差,需要和资源文件进行来回切换 ...
- 转:ASP.NET MVC 多语言实现技巧 最简、最易维护和最快速开发
说说传统做法的缺点 1.做过多语言的都知道这玩意儿太花时间 2.多语言架构一般使用资源文件.XML或者存储数据库来实现.这样就在一定程序上降低了性能 3.页面的可读性变差,需要和资源文件进行来回切换 ...
- ASP.NET MVC 多语言解决方案
1:打开VS,新建ASP.NET MVC4项目 2:创建一个放本地化资源的文件夹并命名为"Language",右键选择添加新项,选择资源文件并命名为"Com" ...
随机推荐
- How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)
1. Create a New Group Create a group called sftpusers. Only users who belong to this group will be a ...
- JS仿淘宝详情页菜单条智能定位效果
类似于淘宝详情页菜单条智能定位 对于每个人来说并不陌生!如下截图所示:红色框的那部分! 基本原理: 是用JS侦听滚动事件,当页面的滚动距离(页面滚动的高度)大于或者等于 "对象"( ...
- lc面试准备:Reverse Linked List II
1 题目 Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1 ...
- 设计模式之(三)Proxy模式
今天学习Proxy模式.代理模式是在对已有对象操作困难或者不太方便时,选择用代理的方式对对象进行访问.Proxy实现的方法必须和被代理对象一致. 举一个简单的例子, 有一个Math类实现了IMath接 ...
- (转) Android的Window类
Android的Window类 2011-03-25 10:02 by Keis, 110 visits, 网摘, 收藏, 编辑 Android的Window类(一) Android的GUI层并不复 ...
- 【转】Android--UI之ProgressBar--不错
原文网址:http://www.cnblogs.com/plokmju/p/android_progressbar.html 前言 开门见山,开篇明意.这篇博客主要讲解一下Android中Progre ...
- C/S结构与B/S结构的特点分析
C/S结构与B/S结构的特点分析 为了区别于传统的C/S模式,才特意将其称为B/S模式.认识到这些结构的特征,对于系统的选型而言是很关键的. 1.系统的性能 在系统的性能方面,B/S占有优势的是其异地 ...
- iOS动态管理AutoLayout的约束NSLayoutConstraint
除了使用Storyboard之外,也可以使用使用代码的方式,动态的向指定的UIView,添加约束. 例如有两个UILabel:someLabel,otherLabel 首先用代码实例化,两个控件 se ...
- Android Studio下载及离线升级方法
由于众所周知的原因,android官网无法访问,所以我们要用到翻.墙.工具,我用的是自.由.门,大家自行搜索下载. android studio下载地址: https://dl.google.com/ ...
- phpmyadmin万能密码
影响版本:2.11.3 / 2.11.4 利用方法:用户名处写入‘localhost’@'@”则登录成功. (注意全部是英文标点符号,最后一个为英文双引号)