I did something similar recently.
 
I stored all the values in a Singleton which contains a dictionary of values 
and then I used an Enum as an indexer.
I also had to give each name a singular or plural meaning.
 
It relies on the FillDictionary method being called.  This means you can fill 
it with any resource.
I then can access it like this:  
StructureDictionary.Instance[Structure.BusinessFunction].Singrular;
or
StructureDictionary.Instance[Structure.BusinessFunction].Plural;
Here is the class
public sealed class StructureDictionary
{
#region members
private Dictionary<Structure, StructureNameLookUp> _lookUpDictionary = new 
Dictionary<Structure, StructureNameLookUp>();
private static readonly StructureDictionary _instance = new 
StructureDictionary();
#endregion
#region static properties
public static StructureDictionary Instance
{
get { return _instance; }
}
 
#endregion
 
#region public properties
public bool Empty
{           
get { return (_lookUpDictionary.Count == 0); }
}
 
#endregion
 
#region public methods
public void FillDictionary(IList<StructureNameLookUp> lookUps)
{
for (int i = 0; i < lookUps.Count; i++)
_lookUpDictionary.Add((Structure)i, lookUps[i]);
}
 
#endregion
 
#region indexers
public StructureNameLookUp this[Structure structure]
{
get
{
if (_lookUpDictionary.Count == 0)
 
throw new Exception("The internal look up list has not been set. You need to 
call FillDictionary");
return _lookUpDictionary[structure];
 
}
 
}
 
#endregion
 
}
[EMAIL PROTECTED]

> Date: Wed, 21 Nov 2007 09:19:30 -0500> From: [EMAIL PROTECTED]> Subject: 
> [ADVANCED-DOTNET] Multiple UI versions....but not quite multilingual....> To: 
> ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > I've got an application that I want to 
> install for multiple clients....all> use English as the principle language 
> but each client has (different)> specific terms for specific domain specific 
> things...> > e.g. what is ones clients 'IS department' is 'Technology' for 
> another> client.> > so the functionality of the system is the same for each 
> client, but I need> to tweak the UI.> > Any recommendations, I've seen people 
> put terms in the database...which> seems clumsy and slow (but that was 
> probably the way they did it), I am> aware it is possible to create different 
> resources for 'multilingual'> apps, but is this technology tied to 
> Globablisation.culture....> > Any suggestions?> > 
> ===================================> This list is hosted by DevelopMentor® 
> http://www.develop.com> > View archives and manage your subscription(s) at 
> http://discuss.develop.com
_________________________________________________________________
100’s of Music vouchers to be won with MSN Music
https://www.musicmashup.co.uk
===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to