473,785 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Localize themed label

Hello,
I've this problem. I need to create a web app, where some text are localized
in many languages. That's ok: I can use "App_Localresou rces" and related
features, and all works. Now, I need also to create different "skins" of
this application. This is also ok: I can use themes and all works, so I have
logos, etc. that change based on active skin.

The problem is that now I need to create personal messages for each skin, in
each languages. If I have a label, for example, I need to write text
specific for each skin, on each language. Every skin has different texts,
and sure every text may be different for each language. I not want manage
all this work with a database and specific code, because I want that the web
layer will be as flexible as possible, without application layers above it.

Is there any way I can have this goal using only asp.net features?

thanks
May 3 '06 #1
1 1319
Hi Trapulo,

Thank you for posting.

As for the Theme & Localization page resource, based on my research, they
could not be used together to provide the functionality you expect.
Actually, Theme is applied at runtime at the page's initlization time,
while the localization page resource( applied through "meta:ResourceK ey"
attribute) is generated as some code which will be called later in page's
lifecycle. e.g:

<asp:TextBox ID="TextBox1" runat="server"
meta:resourceke y="TextBox1Reso urce1"></asp:TextBox>

will cause the asp.net runtime dynamically generate the following code in
dynamic compiled page class:

box1.ToolTip =
Convert.ToStrin g(base.GetLocal ResourceObject( "TextBox1Resour ce1.ToolTip"),
CultureInfo.Cur rentCulture);
box1.Text =
Convert.ToStrin g(base.GetLocal ResourceObject( "TextBox1Resour ce1.Text"),
CultureInfo.Cur rentCulture);

So the Theme can not provide such dynamic functionality on localization
resource locating. IMO, if you do need to provide different localization
resource for different Theme , and apply them onto page, controls
flexiblely, you can not avoid using custom code to read the resource from
local page resource and assign them to certain control's certain property.
However, if you want to make it flexible, you can consider define some
custom webcontrol class dervied from the built-in one(such as Label
control) and add those custom localization code(such as read specific
resource from the resource file according to the current Page Theme) in the
custom control's override funciton(such as PreRender event )...

Regards,

Steven Cheng
Microsoft Online Community Support
=============== =============== =============== =====

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 4 '06 #2

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

Similar topics

1
1176
by: Tom | last post by:
Hi friends my question is is it possible to export the xp theme so that even when app is eventually deployed on win98 or 2000 the UI will be consistent to that of XP ? Thanks Tom
3
2606
by: Tim Marshall | last post by:
I would swear that when I developed in A97, I could change the back colour of a form. However, in Windows XP, on both A97 and A2003, there no longer is a property showing in the format tab for form properties for a back colour. I think the themed control idea is pretty good in that a developer can really go out on a limb if s/he chooses all kinds of fancy background colours for his/her app since colours selection is a very subjective...
0
1151
by: Wayne | last post by:
I've been to the MS website but can't find a resolution to either of the following. When using themed controls, command buttons have a one pixel light colored dot just outside each corner. It is most noticable if the form has a dark colored background. Has anyone else noticed this? The other problem which I've seen mentioned on this group before is the fact that triple state check boxes don't show the Null state when themed controls...
2
2094
by: Darryl Kerkeslager | last post by:
It seems that the only way to make themed AND classic Windows GUIs look okay with tab controls and subforms, due to the color issue, is to place a one page-no button tab control on each subform that will be displayed as part of a main form's tab control, completely covering the subform's detail, and then pasting all the controls onto it. However, this is major cosmetic surgery. 1. Is there some secret way to re-attach event procedures...
6
1544
by: Terry Olsen | last post by:
I decided to use a tab control for my latest project. On Windows XP, the tab control itself is themed (tabs are themed), but the tab pages and any controls I put on them are not themed (except for textboxes). Done a bit of googling on this subject and I found a lot of people with the same problem, but no real solution. Has anyone come up with a good way to get controls to appear themed on a tab page?
1
4126
by: Wayne | last post by:
Not sure if anyone else has noticed this, but it gets around one of the more annoying limitations of using themed controls. Normally when using themed controls a triple state check box looks the same in the unchecked and null states - very annoying and not all that useful. Today I found by accident that if the border style of the checkbox is set to anything other than "solid", the check box takes on the appearance of a non-themed...
5
15030
by: samuelberthelot | last post by:
Hi, I get this exception when I use a themed css file. In my web.config file I have: <pages theme="dRise"> and the trouble page is a master page : <% Response.Write(Header)%> <form id="form1" runat="server"> <div class="FormContent">
0
1770
by: Tim Marshall | last post by:
A2003. I rather like the appearance I get with windows themed controls turned on, but I'm running into an odd problem with tab controls. When I set the back style to transparent, it really isn't transparent. I'm finding instead of one text box or a button that I'd like to have on the form "shining through" and displaying with all pages, it's as if the tab control keeps the odd colour background it generates. I originally developed the...
0
1096
by: Wayne | last post by:
This is probably trivial, but annoying just the same. Has anyone noticed in Access 2003 when using themed controls that the mouseover color fringing does not seem to work properly on command buttons that have an image displayed instead of text? Or is this just happening on my machine?
0
9647
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
9489
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
10356
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
10162
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10100
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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
8988
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
5396
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...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.