Multilanguage User Control

121 views
Skip to first unread message

Complex-IT

unread,
Aug 28, 2008, 7:02:53 AM8/28/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hi !

I have problem - how do I use resource file with user control ?
I'm interested to use multilanguage interface but with UC.

I generate local resource but I don't know hou use it with page
on which is located my UC.

Additionally - I use Master Pages too so can anybody help me ?

Best Regards
Piotr Ufel

Cerebrus

unread,
Aug 29, 2008, 12:30:28 AM8/29/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
How does the use of resources differ whether you call it from a
usercontrol or a page ?

Glenn

unread,
Aug 29, 2008, 6:58:16 AM8/29/08
to DotNetDe...@googlegroups.com

Complex-IT

unread,
Aug 29, 2008, 6:28:08 AM8/29/08
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting

From a Page because usercontrol doesn't have function:
InitializeCulture() which I use like this:

protected override void InitializeCulture()
{

string culture = "en-GB";
this.UICulture = culture;
this.Culture = culture;
System.Globalization.CultureInfo ci = new
System.Globalization.CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture =
ci;
base.InitializeCulture();

}

in fact when I use it with page (not user control) it works fine
but I cannot change resource for usercontrol

I try override OnInit:

protected override void OnInit(EventArgs e)
{
Functions.DdlBind(ddlCounty, SProc.CountyList());

this.Page.UICulture = "en-GB";
this.Page.Culture = "en-GB";

System.Globalization.CultureInfo ci = new
System.Globalization.CultureInfo("en-GB");
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

base.OnInit(e);
}

but doesn't work too

so - any ideas ?
> > Piotr Ufel- Ukryj cytowany tekst -
>
> - Pokaż cytowany tekst -
Reply all
Reply to author
Forward
0 new messages