473,513 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Control Localization

I have a control that has some localizable stuff on it (i.e a GroupBox.Text property).
I'm exposing this property of myGroupBox for the container designer through:
public string The_Caption
{
get {return myGroupBox.Text;}
set {myGroupBox.Text = value;}
}

Now:
I can see/modify this the text from the userControls properties designer (The_Caption property) but when it comes to Localization, I can't assign different values for different localizations to The_Caption.

I don't see a line in the container form like:
this.theuserControl.The_Caption = ((string)(resources.GetObject("$this.theuserContro l.The_Caption")));

It does not depend on the Localizable property of the user control, I've tried it with both, but there's no reason for the control to be localizable, as long as I don't have inner properties that I want to localize, the only properties that I want to be localized are exposed. Anyhow I've tried with/without it and, for the property The_Caption, with none, either or both attributes: [DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)] [Localizable(true)]
Nothing worked.

So, is it a (and which is the) way of having the container of an user control to manage at Localization the exposed property value of the contained control?
Please no silly answers.

--
Horatiu Ripa

Nov 15 '05 #1
1 10286
Horatio,

Change your property declareation to:

[Localizable(true)]
public string The_Caption
{
get {return myGroupBox.Text;}
set {myGroupBox.Text = value;}
}
"Horatiu Ripa" <un****@businessco.us> skrev i en meddelelse news:ey**************@TK2MSFTNGP11.phx.gbl...
I have a control that has some localizable stuff on it (i.e a GroupBox.Text property).
I'm exposing this property of myGroupBox for the container designer through:
public string The_Caption
{
get {return myGroupBox.Text;}
set {myGroupBox.Text = value;}
}

Now:
I can see/modify this the text from the userControls properties designer (The_Caption property) but when it comes to Localization, I can't assign different values for different localizations to The_Caption.

I don't see a line in the container form like:
this.theuserControl.The_Caption = ((string)(resources.GetObject("$this.theuserContro l.The_Caption")));

It does not depend on the Localizable property of the user control, I've tried it with both, but there's no reason for the control to be localizable, as long as I don't have inner properties that I want to localize, the only properties that I want to be localized are exposed. Anyhow I've tried with/without it and, for the property The_Caption, with none, either or both attributes: [DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)] [Localizable(true)]
Nothing worked.

So, is it a (and which is the) way of having the container of an user control to manage at Localization the exposed property value of the contained control?
Please no silly answers.

--
Horatiu Ripa

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2973
by: Weinand Daniel | last post by:
i'd like to monitor changes of the "Control.Name" porperty during designtime. if the user changes the name in designer my event musst fire. i have created a own button control. with an event...
0
1064
by: jagdish patel | last post by:
Hello, I am working on a webapplication with the Localization support.For that I used Localization tool kit of Microsoft. Problem: I cannot add the item into the DropDownList contol,Whose...
6
1973
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with...
2
1538
by: Julia | last post by:
Hi, We want to migrate out asp application to asp.net and take advantage on localization. I want to ask how it is advice to structure the site directory I am going to use resource only...
5
5030
by: Samuel | last post by:
Hi, I am running into a problem of mixing UICulture = auto and allowing users to select culture using a dropdown list. I am detecting a querystring, "setlang", and when found, setting the...
8
2529
by: Olivier Matrot | last post by:
I encounter a problem with Localization features in ASP.NET 2.0. Is seems that the framework is not able to manage neutral cultures such as 'fr', or 'de'. Those are the culture sent by default from...
2
3549
by: bruno | last post by:
I need to localize my ASP.NET app and I just used "Tools" --"generate local resources" command and everything works fine in my WebForms. Resource file name is: MyWebForm.aspx.resx under a subDir...
0
1225
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I have some web pages and user controls (ASCX), I switched my user control to Design View in my VS 2005 (SP1), I chose "Tools --Generate Local Resource" menu to create resource files. ...
1
1751
by: =?Utf-8?B?QnJldHQ=?= | last post by:
I have a basic user control that I want to localize. I created a global resource and connected up the properties I want to localize using an explicit localization expression. Everything works...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
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,...
0
7535
jinu1996
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...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5084
isladogs
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...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1591
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.