[MonoDevelop] Using resource Files on MonoDevelop

Paulo Aboim Pinto esqueleto at tusofona.com
Sat Feb 9 21:20:33 EST 2008


Hello

I'm trying to use resource files on MonoDevelop and I can figure how I do
it.

I try to follow this tutorial:
http://msdn2.microsoft.com/en-us/library/system.resources.resourcemanager.aspx
to create the resource files for default culture and for another culture.

I can use the strings from default resource file, but I can't use the second
resource file. I'm trying to create a file for pt-PT culture.

I add the resource files created with the tutorial above and when I do this:


ResourceManager rm = new ResourceManager("newTestBed",
Assembly.GetExecutingAssembly());
System.Console.WriteLine(string.Format("--> {0}", rm.GetString("Field1")));

I get the default value of the Field1

When I do this:
CultureInfo ci = new CultureInfo("pt-PT");
if (rm.GetResourceSet(ci, true, false) == null)
                System.Console.WriteLine("pt-PT not found");

I always get that "pt-PT not found". Why? I add the newTestBed.resources,
newTestBed.pt-PT.resources to the Resources folder and this still don't
work.
When I compile my project I get this:
Generating satellite assembly for 'pt-PT' culture with al2

If the pt-PT culture is compile to the assembly, why I can't use the
resource.


Regards
Paulo Aboim Pinto
Odivelas - Portugal

-- 
Have income spending 5 minutes a day
Click here: http://bux.to/?r=esqueleto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20080210/e8151c2a/attachment.html 


More information about the Monodevelop-list mailing list