>
 Sunday, November 12, 2006
 Thursday, October 26, 2006

As some of you may now, localization architcture is one of the subject areas that I have always enjoyed. THough I am in the midst of my WCF book, a few months ago I did wrap up a whitepaper for MSDN on the subject of custom resource providers and custom localization expressions. I also learned a lot in the process, with some great feedback from the product team, specifically Simon Calvert and Eilon Lipton, who pointed me in the right direction for how things work under the covers. In this article you'll learn about custom resource managers, storing resources in the database, accessing resources from external assemblies instead of using the App_GlobalResources directory, and creating custom localization expressions to tie it all together. I hope you enjoy this!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ExASPNET20RPM.asp

I'll be writing two follow up whitepapers in this series, a little later this year when I wrap up my book. The subject will be hooking the IDE to help you with your localization dev process and creating complex culture hierarchies that are customizable for personalization. Stay tuned!

10/26/2006 6:32 PM ASP.NET | Globalization  | Comments [29]  |  View reactions  |  Trackback
 Saturday, June 17, 2006

Yes, at last, I am posting my code for my SDC conference sessions. I am quite sorry about this delay, but I have been travelling non-stop since the conference, and I had at least one million other deadlines upon me and Internet issues during the week following when I had promised to post. So, hopefully apology accepted...here is the code references for all 4 of my sessions!!!!

How ASP.NET 2.0 Processes Requests - Handlers, Modules, Caching, Session and other fun objects involved in the round-trip

  • HttpHandlers.zip
  • HttpHandlersVB.zip
  • If you get ASP.NET Pro magazine, I also wrote an article on this subject, which was reprinted with permission in the SDC magazine for this conference

ASP.NET Security - It's About More than Just Credentials

Applied ASP.NET 2.0 - Essentials for Building Professional Web Sites

Performance Tuning and Monitoring your ASP.NET Applications

6/17/2006 11:40 PM ASP.NET | Globalization | Security | Speaking/Events  | Comments [7]  |  View reactions  |  Trackback
 Friday, April 28, 2006

I recently updated my PhotoGallery sample code that illustrates many techniques including:

  • The use of profiles that store preferred theme and culture
  • Dynamic theme selection at runtime based on profile settings
  • The use of ASP.NET 2.0 localization features
  • Setting the request thread's culture dynamically based on profile settings
  • Database localization (table selection by culture)
  • Caching by culture and theme
  • Workaround for retrieving profile information for custom caching (GetVaryByCustomString())

The sample update is at this link: http://www.dasblonde.net/downloads/VS2005/Globalization/GalleryDemo20.zip

These features were always in the sample, but I came up with some improvements for caching and profiles, and I updated the sample so that all pages cache appropriately. I also created a full SQL script that would create the database and insert records, so that you no longer have to restore a full databas to create those records. Otherwise the sample is much the same. Enjoy!

4/28/2006 7:04 PM ASP.NET | Globalization  | Comments [2]  |  View reactions  |  Trackback
 Wednesday, November 30, 2005

In a recent exchange on this forum: http://forums.asp.net/1126817/ShowPost.aspx a few people are looking for tools to help them with the localization process. WARNING, the thread is really long, it will take you two hours to get through it!!! I have already made a lot of remarks in the forum, but it is pretty clear that although ASP.NET 2.0 has taken some of the pain away with the new tools they provided including:

  • Generation of local page resources
  • Declarative expressions that generate code to link control properties to local or shared global resources
  • ResourceManager lifetime management
  • Automatic culture selection from browser settings

...people (of course) still want and need more. I have a perspective on this that is based on my experiences, but you all may have other challenges that differ, so this blog entry is an attempt to collect feedback from you on the tools you'd like to see improved for localization of Web sites. Here's my synopsis of what is needed, and the roles that use the tool:

Improvements to developer tools (VS IDE):

  1. Help me associate control properties to local or shared resources and manage my shared resources as well if I have made those links. Currently this can be done with IDE extensibility, no tools on the market.
  2. Don't let me compile without notification that resource should be regenerated due to changes in the page. In other words, developers are concerned that the page changes might be out of sink with resources associated to the page...and not resolved because the developer forgets to generate resources again.
  3. Provide a tool to automatically (programmatically) generate resources for all pages. 
  4. Help me link a resource entry to a database field. THis would be like data binding, with a custom localization expression linking a $Resource entry to a database field, which implies I need a way to configure the connection string for design time as well. This would still look like an explicit localization expression for a shared resource, but connect to the database instead. THis can be done with extensibility but no robust solutions currently exist.
  5. Perform change management to reconcile changes to invariant resx (local or global) and make sure keys are reconciled with variant (NOTE: I don't agree that this is necessary in the IDE, I think it belongs in change management, but let's keep it here and see what people think).

Change management tools:

  1. Create a difference report for resources on check-in (VSS or VSTS or external tool that can be run against selected source files).
  2. Allow the difference reports to be reconciled from last translator shipment to the latest build (what resources were added, changed, deleted in the invariant version? reconcile this against variant resources)
  3. Pull all resx into a single file, allow translators to edit that single file, the push all translated values into appropriate individual resources again (easy, with XML, and clients have done custom work on this, no tool on the market that I know of)
  4. Pull database content and file content for translators into a localization package for editing by translators offline, then reconcile after changes are made (lots of variations here, what tools do people use today for database access besides running reports and pushing in translated values with script?)
  5. A way to manage this process and keep track of all relevant files/changes

I know this is not an exhaustive list, but it is relevant to the discussions on the thread I mention above.

Please comment or add requests in this blog entry. I speak with this team at Microsoft with some regularity, and have told them about this blog entry...and they are just a great group so they are really interested in hearing this feedback!!!

 

11/30/2005 9:02 PM ASP.NET | Globalization  | Comments [8]  |  View reactions  |  Trackback

Thanks again for participating in this webcast today. Here are a list of resource for globalization as I mentioned in the webcast:

http://www.dasblonde.net/PermaLink.aspx?guid=8d2a4b2c-c2f4-4dab-9bb6-b3218bf17c71

Remember to review the webcast slides for reminder of what we went through, covered a lot of ground!

Also, there is a rather long discussion re: localization tools happening on this thread: http://forums.asp.net/1126817/ShowPost.aspx

I will post a separate entry to collect feedback from you all on tools that you would like to see available for your localization efforts.

 

 

 

 

11/30/2005 8:44 PM ASP.NET | Globalization | Speaking/Events  | Comments [5]  |  View reactions  |  Trackback
 Friday, November 18, 2005

Well folks, it's that time again...MSDN is pulling together a “best of” series for the webcasts presented this year. I'm presenting two of those web casts. The links below will take you to the master list of webcasts coming up...and remember they are free! From there you can find my two events and register.

MSDN Webcast: Building Secure and Interoperable Web Services with WSE (Level 300)
Monday, November 28, 2005
10:00 am - 11:00 am, Pacific Time
 
In this webcast I'll be showing WS-Security between WSE 3.0 and the WebLogic Workshop stack. Great way to get a feeling for the state of interop today on WS-Security.
 
----
 
MSDN Webcast: Going Global Gets Easier with the New Localization Features in ASP.NET 2.0 (Level 300)
Wednesday, November 30, 2005
10:00 am - 11:00 am, Pacific Time

In this webcast I'll be showing off the new globalization features. I was taped doing this presentation at Tech Ed this year, but the VS Beta was bombing on me, a few times, so we didn't have a good run at it...this time will be on the RTM and I can tell you it works just beautifully from my presentations last week at Dev Connections :)

 

 Thursday, November 17, 2005

For my globalization talk, I illustrated how to architect Windows Forms and ASP.NET applications for localization, leveraging .NET resources where appropriate. Here are the samples:

Don't forget to read the instructions for the Web application, it requires a database restore step. If you have any trouble, let me know!

Additional globalization resources:

 

 

 

Cheers!

 Wednesday, November 16, 2005

For this half day smart client tutorial, I talked about UI design, globalization, deployment, versioning, security, offline data and download on demand using the System.Deployment APIs. The sample code uploaded here is drawn from my demos, and a few extras listed here:

UI Design

Thread Safety

Globalization

ClickOnce

Also, we have number of other advanced samples on the IDesign site, don't forget to check out our downloads section of the site.

Thanks for attending the tutorial, and let me know if you have any questions about the code samples.

Cheers!

-Michele

 Saturday, June 11, 2005

In this talk I discussed the new features of localization in ASP.NET 2.0 including:

·        Web Forms resource generator

·        Localization expressions

·        Strongly-typed resources

·        Improved Resource Editor

·        ResourceManager lifetime management

·        Automatic culture selection

·        New Microsoft ASP.NET deployment options

·        New resource provider model

 

The sample I demonstrated showed a simple progression of feature implementation, and you can download that here:

 LocalizeASPNET20codeV2.zip (3.21 MB)

 

In fact, this sample is related to the MSDN article that I updated already to reflect Beta2, and one of these days soon they should post my updated article to the following link:

http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en-us/dnvs05/html/asp2local.asp

 

I also have a more advanced sample, that includes the use of a localized database, the membership provider, profile and themes in 2.0, caching architecture, and more. This sample is available from this blog post:

 

http://www.dasblonde.net/PermaLink.aspx?guid=f8b330d8-0a87-496c-8be3-3aff101bfd58

 

And of course I have some other resources for your interest…

 

Michele’s Globalization Site: http://www.dotnetdashboard.net/sessions/globalization.aspx

Localization Partner Program:

http://www.vsippartners.com/programs/localization

General guidelines on internationalization:
http://www.microsoft.com/globaldev

 

6/11/2005 7:45 PM ASP.NET | Globalization | Speaking/Events  | Comments [6]  |  View reactions  |  Trackback
 Friday, May 13, 2005

My latest globalization article is now live on The Server Side .NET, and I'm working on some new code samples for 2.0, for my upcoming talks at Tech Ed, so stay tuned for more updates on my globalization resource pages!

http://www.theserverside.net/articles/showarticle.tss?id=LocalizationPractices

5/13/2005 9:03 PM .NET | Globalization  | Comments [20]  |  View reactions  |  Trackback
 Tuesday, April 26, 2005

Sometimes defaults are bad. The latest Beta release has a default setting for each @Page directive, that adds the Culture and UICulture parameters as follows:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>

At first blush this may seem reasonable, even good. However we have to consider how these settings are employed at runtime to understand the hidden issues.

Automatic culture setting (as discussed in my article here: http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en-us/dnvs05/html/asp2local.asp) is intended to automatically initialize each request thread to the Culture and UICulture matching the calling user's browser language preferences. That's cool, really cool.

But, in a real world application, we don't just use the browser settings to determine user preferences. We usually collect user preferences in some other way, and persist them in a profile or other data store. I may want to select the default browser setting the first time the user accesses the site, but once I collect their preferences I would prefer to use those going forward.

The <globalization> setting for culture and uiCulture in the web.config is a better place to configure automatic culture selection, since it will apply to all pages in the site (why would you, after all, exclude a page from this?). 

<globalization culture=“auto“ uiCulture=“auto“></globalization>

With this configuration, the request thread's culture settings are initialized very early in the request cycle, even before we intercept the HttpApplication.BeginRequest event. That means we can modify this default, to draw from a data store, before the page handler is executed, and centralize the management of this process. 

If the page setting is also configured, guess what? It proceeds to update the request thread with those settings, before the page is processed. The best thing to do for now, is remove those parameters from your pages after you generate resources, to avoid problems.

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" meta:resourcekey="PageResource1" %>

I know the guys working on this aspect of .NET well enough to know this is probably an oversight of the beta that will be fixed before the final release. And if I'm wrong on that, I guess we will just have some manual labor but at minimum we have a workaround. This doesn't cause any insurmountable problems.

My next article on www.TheServerSide.NET will have some code samples with this solution just for you.
 

4/26/2005 12:07 AM ASP.NET | Globalization  | Comments [6]  |  View reactions  |  Trackback
 Sunday, April 24, 2005

As I prepare a speech for Tech Ed US in Orlando, and a few new articles on the localization front for 2.0, I've noticed a few things you might want to prepare for as you migrate your code samples from Beta 1. Now, there is a site that lists some of the relevant changes from Beta 1 to Beta 2, here:

http://msdn.microsoft.com/asp.net/whidbey/beta2update.aspx

And, I'm duplicating a few of these entries just to provide you with more specifics, and also because I captured this information before I knew about the site :) Here goes...

1. @Page, @Control attribute changes

The CompileWith and ClassName attribute names have changed to CodeFile and Inherits, respectively. So, in your content and master pages you'll change this:

<% @Page Language="C#" MasterPageFile="~/site.master" CompileWith="otherResources.aspx.cs" ClassName="otherResources_aspx" %>

to this:

<% @Page Language="C#" MasterPageFile="~/site.master" CodeFile="otherResources.aspx.cs" Inherits="otherResources_aspx" %>

It looks like there is not a migration tool to automate this process for you, likely because changes between beta releases aren't worthy of a tool. So, deal with it :)

2. <localize> controls require id attribute

The message you get here might be cryptic, if the <localize> element is embedded in existing user controls consumed by one or more pages. Check your <localize> elements and provide an id for them, and magically errors should disappear.

This:

<localize runat="server" meta:resourcekey="LiteralResource1">Culture:</localize>

changes to this:


<localize id="l1" runat="server" meta:resourcekey="LiteralResource1">Culture:</localize>


3. Explicit localization expression syntax change

In previous versions you could specify a default value that would be presented in the absence of supporting .resx files. This would be useful to Web developers, enabling them to design pages without requiring access to resources. It appears the syntax has changed so that any default values specified on explicit localization expressions for shared resources, is not supported. So this:

<%$ Resources:Glossary, BlogTitle, "dasBlonde" %>

changes to this:

<%$ Resources:Glossary, BlogTitle %>

The question is, how should Web developers work with this change? What will they see in the absence of a default, or, is there another way to specify a default? I'm still looking into these details...but I wanted to get these thoughts up here right now lest I forget to blog it! Will update this entry with my findings.

4. Pages and User control class declarations require base class

Previously the partial class generated for the code file of a content page, master page or user control did not specify base class inheritance. Now this is a requirement, and the error messages can be confusing because they refer to the inability to override the base class methods such as GetHashCode() or FrameworkInitialize(). To repair the problem, specify a base class for content pages as System.Web.UI.Page, for master pages as System.Web.UI.MasterPage, and for user controls as System.Web.UI.UserControl. For example this:

public partial class loginMenu_ascx

changes to this:

public partial class loginMenu_ascx : System.Web.UI.UserControl

or, in VB.NET,

Partial Class sidebar_ascx
    Inherits System.Web.UI.UserControl

5. Localization API changes

If you use the Page level APIs to access local page resources, or shared resources, the new methods for this are GetLocalResourceObject and GetGlobalResourceObject, respectively. For example this:

 this.lnkLogin.Text = (string)this.GetPageResourceObject("Login");

changes to this:

 this.lnkLogin.Text = (string)this.GetLocalResourceObject("Login");

6. Event handlers must be protected

Previously event handler declarations were private (no accessibility modifer provided on event handlers). Even handlers must be protected to be accessible therefore a modifier is required. For example this declaration:

void dlCountries_DataBinding(object sender, EventArgs e)

now must be:

protected void dlCountries_DataBinding(object sender, EventArgs e)
  

I'm confused by this requirement, since partial classes are supposed to be "the same class" why should the event handler have to be protected? I need to look into this as well, and post my findings.

 

That's all for now, hope this helps you migrate more quickly! In a few weeks look for a new article on TheServerSide.NET from yours truly related to globalization. And, don't forget my globalization resource site: http://www.dotnetdashboard.net/sessions/globalization.aspx

Ciao for now!

 

4/24/2005 12:14 AM ASP.NET | Globalization  | Comments [2]  |  View reactions  |  Trackback
 Saturday, March 26, 2005

In the short hour we had together on this subject, we looked at many features of Windows and Web localization for .NET 2.0. Big topic, so you’ll want references and code samples to ponder on, and I have collected my globalization resources here:

 

http://www.dotnetdashboard.net/sessions/globalization.aspx

 

Code samples I showed in the session are related directly to samples for my articles, but keep an eye on this reference page for updates coming for Beta 2! Also, the articles will help to review things in depth that we had limited time to touch on.

 

Oh, and stay tuned for more samples in May/June, when I’ll be writing some new articles based on the .NET 2.0 code base. Any requests on solutions you’d like to see added to the resource page? Email me!

3/26/2005 1:14 PM .NET | Globalization | Speaking/Events  | Comments [5]  |  View reactions  |  Trackback
 Wednesday, November 03, 2004

Hey everyone, I recently updated my localization resources page with the latest links to my articles, webcasts and code. Let me know if you want to see more!

http://www.dotnetdashboard.net/sessions/globalization.aspx

Look to this page first for updates to any of my article code, for example. I periodically updated my way of thinking about a problem, so this page will always have my latest best practices.

11/3/2004 12:34 AM .NET | Globalization  | Comments [13]  |  View reactions  |  Trackback
 Friday, October 22, 2004

This whitepaper is finally live and you will not believe how cool the new localization features are for ASP.NET 2.0, I'm duly impressed with the new integrated IDE support for resources, and in particular with the extensibility of localization expressions. Peaked your interest? Read it here:

http://msdn.microsoft.com/asp.net/whidbey/default.aspx?pull=/library/en-us/dnvs05/html/ASP2local.asp

I really enjoyed working with Achim Ruopp and Simon Calvert of the localization team at Microsoft on this paper. They were a fantastic resource for getting me up to speed on the underpinnings of the new localization features of ASP.NET 2.0. I could not have written this paper with as much detail without some insider feedback so I really have to thank you guys for answering all of my detailed questions and for all the time you took to give comprehensive feedback during each review cycle. Thanks guys!

 

10/22/2004 2:12 PM ASP.NET | Globalization  | Comments [43]  |  View reactions  |  Trackback
 Thursday, October 21, 2004

For today's webcast, my resource page is:

http://www.dotnetdashboard.net/sessions/globalization.aspx

I have new samples to post here, and shortly a whitepaper on ASP.NET 2.0 localization features, so keep an eye on this link for changes in the next few weeks!

 

10/21/2004 4:24 PM ASP.NET | Globalization | Speaking/Events  | Comments [1]  |  View reactions  |  Trackback
 Tuesday, October 12, 2004

Hey guys, these webcasts are FREE, and there are a lot of really great topics being covered this week. Apparently you have to register soon because they have limits on the number that can participate live! I'm doing a new and improved version of my favorite talks on ASP.NET on Oct 21 and 22 first thing in the AM (see level 200 in the links below)....don't miss!

Here's how you register:

 

10/12/2004 5:22 PM ASP.NET | Globalization | Speaking/Events  | Comments [3]  |  View reactions  |  Trackback
 Thursday, July 01, 2004

Thank you for attending my session last evening. As I mentioned, I gave this talk previously at Tech Ed San Diego, but since then I have actually added some more code samples and discussion points that I unfortunately didn't have time to explore during the session.

My globalization resource page can be found here:
http://www.dotnetdashboard.net/sessions/globalization.aspx

Look for a new sample with a script for versioning and deployment shortly. I'll update this blog entry when it is finally there. Thanks for coming to the session!

7/1/2004 8:45 AM .NET | Globalization | Speaking/Events | TechEd  | Comments [71]  |  View reactions  |  Trackback
 Thursday, June 24, 2004

Some of you may know I have a minor in internationalization, meaning, although it is not my primary focus, I spend a good amount of time exploring answers to challenges my clients and readers face. Well, a new blogger focused 100% on this topic has gone live. Meet Achim Ruopp from Microsoft...

6/24/2004 12:25 AM .NET | Globalization  | Comments [2]  |  View reactions  |  Trackback
 Friday, May 28, 2004

Thanks to everyone for getting up so early (two days in a row, some of you!) to attend this session! The resources for this talk are here:

 

The latest code is up there now!

5/28/2004 12:42 AM .NET | Globalization | Speaking/Events | TechEd  | Comments [3]  |  View reactions  |  Trackback
    ON THIS PAGE
    SEARCH
    CATEGORIES
    ARCHIVES
    BLOGROLL

Designed by NUKEATION STUDIOS