473,386 Members | 1,773 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.

custom localization with ExpressionBuilder

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
GetGlobalResourceObject() 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 GetCodeExpression(
BoundPropertyEntry entry
, object parsedData
, ExpressionBuilderContext context
)
{
StringBuilder objStr = new StringBuilder();

objStr.Append( HttpContext.GetGlobalResourceObject("Text",
entry.Expression.Trim()).ToString() );

return new CodePrimitiveExpression(objStr.ToString());
}

Feb 28 '06 #1
0 1070

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

Similar topics

0
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: ...
10
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...
5
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...
7
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...
0
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...
2
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...
2
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 =...
0
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...
3
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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.