资源(的.resx)文件密钥命名约定? [英] Resource (.resx) file Key naming conventions?

查看:180
本文介绍了资源(的.resx)文件密钥命名约定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建一个C#应用程序,可能会包含一对夫妇的资源文件来存储字符串语言翻译的使用。我想拿出我的种源文件的命名约定的钥匙。有没有人在我之前解决了这个?

I'm building a C# app that will likely contain a couple resource files to store strings for use in language translation. I'm trying to come up with a naming convention for the Keys in my resouce files. Has anyone tackled this before me?

推荐答案

只需使用帕斯卡命名约定。不要属性的关键模块或类。 。概括它,以便它可以重复使用

Just use Pascal naming convention. Dont attribute the key to a module or the class. Generalize it so that it can be reused.

例如:ReadWriteWarningMessage

Eg: ReadWriteWarningMessage

点分隔约定正常工作菜单项目。但是,关于字符串什么是动态或用户信息生成的。

The dot separated convention works fine for menu items. But what about strings that are generated dynamically or user messages.

这篇关于资源(的.resx)文件密钥命名约定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆