在resx文件中添加资源字符串以进行本地化 [英] Adding resource string in resx file for localization
本文介绍了在resx文件中添加资源字符串以进行本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的asp.net页面中有一个字符串,我希望本地化.......所有代码都已完成,但问题是字符串就像User+ label.text +成功添加数据库。
我可以将该字符串添加为一个字符串,如果是,那么如何......
i have a string in my asp.net page and i want to localized that .......all code is done but the problem occurs that string is like that "User " +label.text+ "added succesfully in the database ."
Can i added that string as one string and if yes then how ......
推荐答案
是的,您必须使用字符串格式。即用户{0}在数据库中成功添加。您可以将此字符串存储在资源文件中,然后在代码中使用它。
赞:
Yes, you must use string formats. i.e "User {0} added successfully in the database". You would store this string in a resource file and subsequently use this in your code.
Like:
string.format(ResourceFile.ResourceName, username);
这篇关于在resx文件中添加资源字符串以进行本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文