When using resource files (*.resx) to implement translations, Visual Studio helpfully provides the base-language file's value in a tool-tip whenever you hover over a key:
(there I have an entry Named "str_message" with the value "Message").
It's a minor annoyance, but is there any way to override or change that tooltip's format?
It puts the value directly in-line and always appends a period (like String.Format("Looks up a localized string similar to {0}.", ...)
, which is okay but can get confusing at a glance, especially if your values are longer and (may) contain their own punctuation at the end. Is there any way I can change that to something like: String.Format("Looks up a localized string similar to:\n\n{0}", ...)
, or even just show the "Comment" value from the .resx file?
Well, I think it picks it up from the property comments
in the Resources.Designer.cs
that has been created. I am on a MAC and don't have a visual studio installation to try this out, so you could try changing the comment and see if that is reflected.
For eg. you should be seeing something like this in your Resources.Designer.cs
/// <summary>
/// Looks up a localized string similar to Message
/// </summary>
internal static string str_message {
get {
return ResourceManager.GetString("str_message", resourceCulture);
}
}
If not, then I am not sure it can be changed.
@Brduca says, changes to this WILL be overwritten if you rerun the tools, so this might not be the best way, but if it is the only way, then you'll have to manage redoing the .cs file everytime you rerun the tools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With