Chorn Sokun's Weblog

Conquer inner fear, push it to the limit!

Posts Tagged ‘ASP.NET

Khmer Localization with .NET

leave a comment »

Localization in .NET doesn’t seem to solve a lot of problem in theory but I get no luck to get it work, although I built a custom Culture and having the resource file embedded in the assembly it just WON’T WORK !

After look around for solution I decided to give up and cheat a bit building localization engine from scratch is not too difficult but I tend not to spend my time on this yet.

So here is my way to have bilingual UI (Khmer & English)

by faking treat fr-FR == km-KH and that work !

Never die with your tool, exercise your brain ;)

Written by Chorn Sokun

October 1, 2009 at 9:10 am

Posted in Programming, Tips & Tricks

Tagged with ,

ASP.NET Globalization & Localization Take #2

leave a comment »

In my previous post “.Net 2.0 App_GlobalResources within VS.NET 2008” I was successfully manipulate string stored in satellite assembly that was the isolation test to make sure that thing work. 

ASP.NET Web Application Basic Structure

ASP.NET Web Application Basic Structure

The next move is to integrate the technique with my MonoRail solution. In theory the trick should work like magic;

Castle Basic Structure

Castle Basic Structure

BUT nope I got nothing in return I verify the satellite assembly through Reflection nothing different. So what the heck is going on ???

Now take a look at how I solved the mismatch:

ASP.NET Web Application

ResourceManager rm = new ResourceManager(
   "Web.Applications2.Strings", Assembly.GetExecutingAssembly());


ResourceManager rm = new ResourceManager(
   "Basic.Web.Resources.Strings", Assembly.GetExecutingAssembly());

Can you spot the different?

Written by Chorn Sokun

September 10, 2008 at 2:03 pm

ASP.NET FileUpload Revisited

with 2 comments

It is very interesting early on this week the HR’s guy come to my desk and told me he no longer be able to upload job’s annoucement attachment file ??! I said woh woh what you said? because we hosted the app and he successfully uploaded files many times.

After confirm that was the problem I run through the net to find what cause the problem why it just occur now? Well it must be something change along the windows update anyway I solved the problem and now the app back to it normal operation.

But I am glad to see the topic of File Upload has been digged up again let un-DRY it shall we?

Written by Chorn Sokun

June 29, 2008 at 12:00 am