The standard color names are english names, ok. But my Application is german so I would like to have the color names in my ComboBox
as german names. Instead of \"Bl
As a follow-up to peetee's question and link to this German page about Netscape color names, I've built a small C# wrapper class that you can drop-into your project.
To use, simply call it something similar to:
string germanName = ColorNameGermanTranslator.GetGermanName(Color.Green);
and you get the German name back. It uses the English name as a fallback.
No, these are property names -- as much part of the code / class definition as the String.Length property -- not resources. Property names aren't localised.
Sorry, the code snippet was gone ... so here it is:
<ObjectDataProvider MethodName="GetType"
ObjectType="{x:Type sys:Type}"
x:Key="colorsTypeOdp">
<ObjectDataProvider.MethodParameters>
<sys:String>System.Windows.Media.Colors, PresentationCore,
Version=3.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35</sys:String>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
I have found a useful table that gives me some Translations (english names and german ones) The table can be found here.
I will use the texts and a Converter to display the German color names.