locked
Localized values in dropdown list RRS feed

  • Question

  • User-1376793602 posted
    Can I use a resource file to store a 2 dimensional array? I want to be able to load the values for my dropdowns from the resource files that contain all the literals for my site. The current plan I have is that there will be a single file for each language. So if I could store name value pairs within a single record in my resource file I could then have the names be the same for all languages but the values be different. I suppose I could create a different resource file to represent each set of look up table values, but I was hoping I could just keep everything in a single place. Any ideas? Thanks in advance, Scott
    Sunday, December 12, 2004 1:06 AM

All replies

  • User-751653828 posted
    Why don't you store the values as XML and transform them on the fly? I think that is the closest that you will get to a "true" multidimensional array.
    Sunday, December 12, 2004 1:29 AM
  • User-1000197047 posted
    Just use a special delimiter char like a comma or semicolon or colon or whatever you think won't be used in the text values. You could use a charater combination if you are worried about a single character case. Then simply separate the name and value pairs by that character/combination and use the String.Split function to separate them into an array and then read the name followed by the value etc.
    Wednesday, January 5, 2005 10:43 PM