我可以在HTML中使用resourcekey吗? [英] can I use resourcekey in HTML?
问题描述
我写了一个使用资源键来支持多语言支持的ASP.Net程序。现在我想标记这个模块以使用户可以给它赋予模板。
/ p>
因为我将令牌放到模块中,我将替换它。例如,如果用户在HTML中输入[lblsomething],我会将其替换为
< span id =lblsomething>某些< / span>
现在问题是如何使用资源键与此跨度来支持多语言,就像我在ASP.Net < asp:label resourcekey =lblsomething>< / asp:label>
非常感谢您提供的任何帮助
您可以在cs中试用它:
string something = Localization.GetString(KEY,this.LocalResourceFile);
string html =< span id =lblsomething>+ something +< / span>
然后将html字符串添加到页面中
I wrote an ASP.Net Program that use resource key to support multi language support
Now I want to tokenize this module to enable user give template to it.
for that I give tokens to user to drop it in module and I will replace it. for example if user type [lblsomething] in HTML I will replace it with
<span id="lblsomething"> something </span>
Now the problem is how can i use resource key with this span to support multi language just like what i have in ASP.Net <asp:label resourcekey="lblsomething"></asp:label>
Thanks a lot for any help you can provide
you can try it in cs:
string something=Localization.GetString("KEY" , this.LocalResourceFile);
string html="<span id="lblsomething">"+something+"</span>"
and then add html string to page
这篇关于我可以在HTML中使用resourcekey吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!