Results 1 to 4 of 4

Thread: KnownColour in local language

  1. #1

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536

    KnownColour in local language

    I've got the following code in my application. When I run it on my English PC (with English .NET Framework) the combo box populates with "Red", "Yellow", "Blue".

    I was hoping that when I ran it on a German PC it would populate with "Rot", "Gelbe", "Blau". This doesn't seem to happen. I hope this is just because I have English .NET installed on my German Win2000 PC.

    Does anyone have a non-English language version of .NET framework installed? Could you test this for me please?


    Thanks.

    VB Code:
    1. With cboColour.Items
    2.             .Add(KnownColor.Red)
    3.             .Add(KnownColor.Yellow)
    4.             .Add(KnownColor.Blue)
    5.  
    6.             .SelectedItem = KnownColor.Red
    7.         End With
    This world is not my home. I'm just passing through.

  2. #2

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536


    Well, I reinstalled my German Win2000 PC with German .NET 1.1 and the German Language pack.

    Guess what?

    The combo still displays the colors (sic) in American.

    Ah well...
    This world is not my home. I'm just passing through.

  3. #3
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    well known colors are still static variables i guess.. just like when that a command like .CLICK wont become german in a german .net framework installed whatever

    i think that something like blue just gets converted to 0,0,255 or so.


    why did you want to do so anyway
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  4. #4

    Thread Starter
    Frenzied Member trisuglow's Avatar
    Join Date
    Jan 2002
    Location
    Horsham, Sussex, UK
    Posts
    1,536
    It was easy to write the code if I just populated the combo box with KnownColor items - it took care of the text in the combo box and I could just apply the SelectedItem to my other objects when the user clicked on the combo. I was hoping that it would take care of the language translations for free as well.

    I've had to rewrite it now to look up the colour names from a resource file and add them as string objects to the combobox. I also now have to use SelectedIndex and a Select Case construct to make the assignments to my objects when the user clicks on the combo.
    This world is not my home. I'm just passing through.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width