can I call getString() to get a string from a separate resource file instead of embedded resource?

  • Thread starter Thread starter babylon
  • Start date Start date
B

babylon

currently, I'm using

this.rm = new ResourceManager("LanguageTest.LangPack",
System.Reflection.Assembly.GetExecutingAssembly());
mystring = rm.getString("XXX");

can i leave the resx as is and load it @ run time?

thx
 
If you plan to use ResourceManager class, then you ought to have resources
in an assembly(normal or satellite). The usefullness of resourcemanager is
that it automatically loads the right resources based on the current thread
culture. You can use classes from System.Xml and work of resx files
directly, but remember that you need to bear the head ache of loading the
right resources (based on culture), basically redoing whatever
ResourceManager already provides...
 
so..it means that the RM don't support 'external resources'...

Actually, what i wanna to do is to provide language pack addon for my
program.
my program may comes with 2-3 lang. support, and I'll let other to load the
language pack dynamically

if the resources has to be embedded into the assembly..
i'll probably specifiy put all the strings mapping into a text file (maybe
with extension .lng)

Manoj G said:
If you plan to use ResourceManager class, then you ought to have resources
in an assembly(normal or satellite). The usefullness of resourcemanager is
that it automatically loads the right resources based on the current thread
culture. You can use classes from System.Xml and work of resx files
directly, but remember that you need to bear the head ache of loading the
right resources (based on culture), basically redoing whatever
ResourceManager already provides...

--
HTH,
Manoj G [.NET MVP]
http://www15.brinkster.com/manoj4dotnet
babylon said:
currently, I'm using

this.rm = new ResourceManager("LanguageTest.LangPack",
System.Reflection.Assembly.GetExecutingAssembly());
mystring = rm.getString("XXX");

can i leave the resx as is and load it @ run time?

thx
 
Back
Top