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 編輯過 |
關鍵字查詢
相關文章
正在查詢... |