简体   繁体   English

任何人都可以通过示例给我Dotnetnuke模块本地化

[英]Can any one give me Dotnetnuke module localization with example

please any one can provide me a good example of dotnetnuke module localization....i am new to DNN...thanks.. 请任何人都可以为我提供dotnetnuke模块本地化的好例子....我是DNN的新手......谢谢..

Edit : I have googled a lot haven't found any good example 编辑 :我google了很多没有找到任何好的例子

first add your language to DNN (in DNN6 go to Admin -->languages and add your language) your module have App_LocalResouces folder .this folder have resx files.for localization you must use this files. 首先将您的语言添加到DNN(在DNN6中转到管理员 - >语言并添加您的语言)您的模块具有App_LocalResouces文件夹。此文件夹具有resx文件。对于本地化,您必须使用此文件。 for every resx file you must add a new resx file for your language. 对于每个resx文件,您必须为您的语言添加新的resx文件。 for example if your culture name is "fa-IR", and you have a resx file with name "Edit.ascx.resx", you should make a copy from this file and change name of this copy to "Edit.ascx.fa-IR.resx" . 例如,如果您的文化名称是“fa-IR”,并且您有一个名为“Edit.ascx.resx”的resx文件,则应从该文件复制并将此副本的名称更改为“Edit.ascx.fa” -IR.resx“。 and then translate this new resx file items to your language if you want to add items to this resx file you should use resoursekey element in your ascx file for example: 然后,如果要将项目添加到此resx文件,则应将此新的resx文件项目翻译为您的语言,您应该在ascx文件中使用resoursekey元素,例如:

  <asp:Label ID="lblExample" runat="server" resourcekey="lblExample">

and then in both resx files add lblExample key and its value if you want use value of this controls in your code add this to your code 然后在两个resx文件中添加lblExample键及其值,如果你想在代码中使用这个控件的值将它添加到你的代码中

  string lblMessage;
  lblMessage = Localization.GetString("lblExample", this.LocalResourceFile);

you can replace "this.LocalResourceFile" with address of your resx file 你可以用你的resx文件的地址替换“this.LocalResourceFile”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谁能告诉我我提到的示例是否是回调机制的示例? - Can any one tell me if the example I have mentioned is an example of a callback mechanism 可以举个例子,说明何时应该使用UIElement.UpdateLayout()? - Can give me an example that when should use UIElement.UpdateLayout()? 你能给我一个在.NET中导致内存碎片的例子吗? - Can you give me an example that causes memory fragmentation in .NET 谁能给我一个使用BouncyCastle将.pem公共DSA密钥导入c#的示例吗? - Can anyone give me an example of using BouncyCastle to import .pem public DSA key into c#? 有人可以给我一个如何在C#中使用System.Monitor的简单示例吗? - Please can someone give me a simple example of how to use System.Monitor in C#? 当我使用“显示器”时,因为不能用“锁定”来完成,您能举一个简单的例子吗? - Can you give me a simple example when I am to use “monitor” because it cannot be done with “lock”? 我可以强制SSL保护Dotnetnuke模块编辑页面吗? - Can I force SSL to secure a Dotnetnuke Module Edit Page? 任何人都可以建议使用moQ框架的分步示例 - Can any one suggest a step by step example for using moQ framework 模块的ObjectDataSource的DotNetNuke位置 - DotNetNuke Location for ObjectDataSource for Module DotNetNuke中的自由格式模块 - Free Form Module in DotNetNuke
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM