[MonoDevelop] Using resource Files on MonoDevelop

Petit Eric surfzoid at gmail.com
Sun Feb 10 06:31:56 EST 2008


2008/2/10, Petit Eric <surfzoid at gmail.com>:
> 2008/2/10, Paulo Aboim Pinto <esqueleto at tusofona.com>:
> > 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.
> Because, i think the culture of your system is not pt-PT.
Also your form(s) should have property "localizable" to "true".
> >
> >
> > Regards
> > Paulo Aboim Pinto
> > Odivelas - Portugal
> >
> > --
> > Have income spending 5 minutes a day
> > Click here: http://bux.to/?r=esqueleto
> > _______________________________________________
> > Monodevelop-list mailing list
> > Monodevelop-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/monodevelop-list
> >
> >
>


More information about the Monodevelop-list mailing list