473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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_Localresources" 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 1299
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:ResourceKey"
attribute) is generated as some code which will be called later in page's
lifecycle. e.g:

<asp:TextBox ID="TextBox1" runat="server"
meta:resourcekey="TextBox1Resource1"></asp:TextBox>

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

box1.ToolTip =
Convert.ToString(base.GetLocalResourceObject("Text Box1Resource1.ToolTip"),
CultureInfo.CurrentCulture);
box1.Text =
Convert.ToString(base.GetLocalResourceObject("Text Box1Resource1.Text"),
CultureInfo.CurrentCulture);

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
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
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...
0
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...
2
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...
6
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...
1
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...
5
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...
0
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...

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.