asp.net 实现多语言
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
一.在App_GlobalResources这个目录下建立要实现语言的资源文件: Resource.resx //必要的 Resource.zh-cn.resx Resource.en-US.resx ...... 参考下表来建
二.页面调用 <asp:Label ID="Label1" runat="server" Text="<%$Resources:Resource,String1%>" Width="76px"> </asp:Label> 三.根据实际情况具体实现: protected override void InitializeCulture() { //this.Page.UICulture = "en-US"; this.Page.UICulture = "zh-cn"; }
原文链接:https://blog.csdn.net/steelwu/article/details/2686336 该文章在 2025/8/22 16:52:56 编辑过 |
关键字查询
相关文章
正在查询... |