473,670 Members | 2,630 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.Tex t = 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.theuserCon trol.The_Captio n = ((string)(resou rces.GetObject( "$this.theuserC ontrol.The_Capt ion")));

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: [DesignerSeriali zationVisibilit y(DesignerSeria lizationVisibil ity.Content)] [Localizable(tru e)]
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 10303
Horatio,

Change your property declareation to:

[Localizable(tru e)]
public string The_Caption
{
get {return myGroupBox.Text ;}
set {myGroupBox.Tex t = value;}
}
"Horatiu Ripa" <un****@busines sco.us> skrev i en meddelelse news:ey******** ******@TK2MSFTN GP11.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.Tex t = 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.theuserCon trol.The_Captio n = ((string)(resou rces.GetObject( "$this.theuserC ontrol.The_Capt ion")));

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: [DesignerSeriali zationVisibilit y(DesignerSeria lizationVisibil ity.Content)] [Localizable(tru e)]
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
2982
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 NameChange. during runtime it works fine. if the name of the control has changed the event is fireing. (for example: designtime name of the button is btnOk, on a second button
0
1068
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 vlaue come form the Localization database(set the key of the control).I also not set the index property for the DropDownList control.
6
1982
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 --->LocalizationManagement.exe, I get an exception: --->Unable to generate loose file resources
2
1557
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 assemblies The site is an intranet site so I don't see problems to cache some resource
5
5037
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 CurrentUICulture to what's specified in the querystring. Since I want to allow UICulture auto detecting, I add UICulture = "auto" to page directive on each page.
8
2538
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 a french or German Internet Explorer in France or Germany. There is a runtime error "System.NotSupportedException: Culture "fr" is a neutral culture. It can not be used in formatting and parsing and therefore cannot be set as the thread's...
2
3570
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 named: "App_LocalResources" inside the App directory. Now I need to localize some messages my VB app sends to the user. What I'm looking for is a way to read from a .resx file and get the appropriate values. I found some examples like this...
0
1229
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. After a while, my VS2005 reported "Start creating resource content and adding 'meta:' attributes to server controls and directives. Finished creating resource content and adding 'meta:' attributes."
1
1759
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 great, I can even see the localized text in design time when I am viewing the control. When I look at the page the control sits on at design time however I can't see the localized text. It's like the control's localization expression isn't being...
0
8468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8660
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7415
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4209
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2799
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 we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.