Hello,
I use vs2005 and I try to find out how I can get a list of the cultures
where I have made resources for.
So I can make a combobox where I can choose the language I want to use.
With CultureInfo.GetCultures I became a complete list, but how can I filter
only the Cultures I need?
Thanks
Gerrit 4 4416
Gerrit,
You need to create a type that derives from ResourceManager. Then,
create an instance of your ResourceManager for the appropriate assembly. In
your derived class, you can then expose the keys to the Hashtable stored in
the ResourceSets field of the ResourceManager (it is marked as protected, so
it will be available to you).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message
news:3b**************************@news.chello.nl.. .
Hello,
I use vs2005 and I try to find out how I can get a list of the cultures
where I have made resources for.
So I can make a combobox where I can choose the language I want to use.
With CultureInfo.GetCultures I became a complete list, but how can I
filter only the Cultures I need?
Thanks
Gerrit
Nicholas,
Thanks for your answer. But I don't know how to do it. Can you give me some
hints?
I have sometihing like this, but that doesn't work..
public class MyClass
{
public void FillLanguagesComboBox()
{
MyManager manager = new MyManager();
manager.GetHashCode();
}
}
public class MyManager : ResourceManager
{
}
Thanks, Gerrit
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschreef
in bericht news:73**********************************@microsof t.com...
Gerrit,
You need to create a type that derives from ResourceManager. Then,
create an instance of your ResourceManager for the appropriate assembly.
In your derived class, you can then expose the keys to the Hashtable
stored in the ResourceSets field of the ResourceManager (it is marked as
protected, so it will be available to you).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message
news:3b**************************@news.chello.nl.. .
>Hello,
I use vs2005 and I try to find out how I can get a list of the cultures where I have made resources for.
So I can make a combobox where I can choose the language I want to use.
With CultureInfo.GetCultures I became a complete list, but how can I filter only the Cultures I need?
Thanks Gerrit
GS,
You need to access the ResourceSets Hashtable instance exposed by the
ResourceManager class in your MyManager class. So basically, you would do
something like this:
public class MyManager : ResourceManager
{
public Hashtable GetResourceSets()
{
return ResourceSets;
}
}
You really shouldn't do it like that, as it exposes the internal
hashtable for that resource manager, which makes it open to being changed
(you should get the keys from the hashtable and expose those).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message
news:47***********************@news.xs4all.nl...
Nicholas,
Thanks for your answer. But I don't know how to do it. Can you give me
some hints?
I have sometihing like this, but that doesn't work..
public class MyClass
{
public void FillLanguagesComboBox()
{
MyManager manager = new MyManager();
manager.GetHashCode();
}
}
public class MyManager : ResourceManager
{
}
Thanks, Gerrit
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschreef
in bericht news:73**********************************@microsof t.com...
>Gerrit,
You need to create a type that derives from ResourceManager. Then, create an instance of your ResourceManager for the appropriate assembly. In your derived class, you can then expose the keys to the Hashtable stored in the ResourceSets field of the ResourceManager (it is marked as protected, so it will be available to you).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message news:3b**************************@news.chello.nl. ..
>>Hello,
I use vs2005 and I try to find out how I can get a list of the cultures where I have made resources for.
So I can make a combobox where I can choose the language I want to use.
With CultureInfo.GetCultures I became a complete list, but how can I filter only the Cultures I need?
Thanks Gerrit
Unforunately is is not working, or I can not get it working.
But isn't it so that ResourceSets gets the available strings etc of the
loaded Resource / CultureInfo and not a list of the available translations?
Thanks, Gerrit
-- www.gsnel.nl
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschreef
in bericht news:eA**************@TK2MSFTNGP02.phx.gbl...
GS,
You need to access the ResourceSets Hashtable instance exposed by the
ResourceManager class in your MyManager class. So basically, you would do
something like this:
public class MyManager : ResourceManager
{
public Hashtable GetResourceSets()
{
return ResourceSets;
}
}
You really shouldn't do it like that, as it exposes the internal
hashtable for that resource manager, which makes it open to being changed
(you should get the keys from the hashtable and expose those).
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message
news:47***********************@news.xs4all.nl...
>Nicholas,
Thanks for your answer. But I don't know how to do it. Can you give me some hints?
I have sometihing like this, but that doesn't work..
public class MyClass { public void FillLanguagesComboBox() { MyManager manager = new MyManager(); manager.GetHashCode(); } }
public class MyManager : ResourceManager {
}
Thanks, Gerrit
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> schreef in bericht news:73**********************************@microso ft.com...
>>Gerrit,
You need to create a type that derives from ResourceManager. Then, create an instance of your ResourceManager for the appropriate assembly. In your derived class, you can then expose the keys to the Hashtable stored in the ResourceSets field of the ResourceManager (it is marked as protected, so it will be available to you).
-- - Nicholas Paldino [.NET/C# MVP] - mv*@spam.guard.caspershouse.com
"GS" <gs*************@hotmail.comwrote in message news:3b**************************@news.chello.nl ... Hello,
I use vs2005 and I try to find out how I can get a list of the cultures where I have made resources for.
So I can make a combobox where I can choose the language I want to use.
With CultureInfo.GetCultures I became a complete list, but how can I filter only the Cultures I need?
Thanks Gerrit
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Neuruss |
last post by:
IronPython is currently at a pre-alpha stage suitable for
experimentation but not for serious development work.
http://www.ironpython.com
|
by: saravanan.arul |
last post by:
Hi this sarav...
I having some languages in dropdownlist(like
english,tamil,japan.......)
based on this dropdown selection full application need to change
corresponding language..
Anyone...
|
by: FAQ server |
last post by:
-----------------------------------------------------------------------
FAQ Topic - What online resources are available?
-----------------------------------------------------------------------
*...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |