473,804 Members | 3,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

custom localization with ExpressionBuild er

Greeting,

I'm attempting to write customize expression-builder . As to
replace\enhance the build-in Resources exp-builder.

It work in a way. However, somehow the resources I retrieved using
GetGlobalResour ceObject() always getting me the default culture.

I hardcoded the culture setting at session_onstart , to test Chinese
text. They all worked fine with the built-in Resources.

However, if I switch to my own stuff, always return the default (eng)
text.

when using my own custom stuff, only need the resource-item-key, at
initial testing stage.
<%$ ResourceEx: SomeText %>

my coding of the exp-builder:

public override CodeExpression GetCodeExpressi on(
BoundPropertyEn try entry
, object parsedData
, ExpressionBuild erContext context
)
{
StringBuilder objStr = new StringBuilder() ;

objStr.Append( HttpContext.Get GlobalResourceO bject("Text",
entry.Expressio n.Trim()).ToStr ing() );

return new CodePrimitiveEx pression(objStr .ToString());
}

Feb 28 '06 #1
0 1096

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

Similar topics

0
1021
by: Robert W. | last post by:
I have a 'frmMain' that I would like to add localization capabilities to. For now I'm just going to focus on English and Spanish. So I got Visual Studio to automatically create these 3 files: frmMain.en.resx frmMain.es.resx frmMain.resx They all work great for automatically changing strings of controls I've laid out on the form. But I also want to add in a number of custom strings that
10
1977
by: Daves | last post by:
Is there any way to have a custom server control for all aspx pages which runs code before the page_load event? I need some code to be run before the page_load since it's supposed to change some Page properties, something like an include file in the old classic asp days...
5
2610
by: Martin Bischoff | last post by:
Hi, is it possible to implement custom resource managers for ASP.NET 2.0 so that strings can be read from a database (for example)? Ideally, it should be possible to configure the custom resource manager in web.config, so that it replaces the default resource manager. Using the <%$ ... %> syntax should read the strings via the custom resource manager, e.g. when used like this:
7
1749
by: Julian Jelfs | last post by:
Hi, I had an aspx pag in .Net 1.1 with a label on it. As such I had a code behind page with a declaration for that label. When I convert to Asp.Net 2.0 the code behind is converted to a partial class and the declaration for the label is removed. This is what I expected to happen and I understand why it has happened. The problem I have is that I had added a custom attribute to my label
0
1269
by: jonathan.eves | last post by:
Hi I am having a hard time with localization of the sitemap. I have created a custom SiteMapProvider which inherits from StaticSiteMapProvider. For which everything works fine. The next thing i did was to add a unique resource key to each the nodes and add these resource keys to my globalisation database. Running a SQL Trace shows that the call for the localized resource is never made. Here is the code that builds creates my nodes
2
1708
by: Dushyant | last post by:
Hi everyone, Actually I have recently started working with ASP.NET 2.0 and I have been working on the globalization aspect of my company's web project. At this moment, I am struck with localization of .ascx file ie custom user controls. Can't we do it implicitly as we do for .aspx files or web forms pages? Any other ways through which I can accomplish it. All the responses are welcome.
2
2070
by: aeden.jameson | last post by:
I have a drop-down list the I want to use to control the visibility of button fields. Here's an example of one of my button fields, <asp:ButtonField Visible='<%$ Code:ddlReason.SelectedValue = Status.Review %>' CommandName="Review" Text="Review" /> The value of ddlReason.SelectedValue within the custom expression is constant even if I select another value from the dropdown. Why does this occur?
0
953
by: jesper_lofgren | last post by:
Hi, I have a custom build provider that gets data from a webservice. I have the XMLFeedUrl as a config parameter on the provider, my question is... If i need to get xmlfeeds from two diffrent urls based on localization, they provide the same xmlstructure just diffrent language.
3
1691
by: AleXmanFree | last post by:
Hi , I have got problem with passing my inline based value to y user control (or custom control, no matter which one I use, I have tried both to make sure it doesnt matter) . So say I have property called ImagePath and i want to pass my value through asp.net specific inline cunstruction: <uc:MyControl runat=server id="someId" ImagePath="<%= Request.ApplicationPath %>/App_Themes/<%= Page.Theme %>/Images/ ball_.png" />, problem that in...
0
9705
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
10568
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
10323
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
10311
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
10074
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
9138
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...
1
7613
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4292
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

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.