This project is read-only.

Multiple languages with WebStarterKit

Topics: Developer Forum
Feb 12, 2007 at 12:39 PM
Hy to all of you folks. I was able to make a localization of MyWebStarterKit to support multiple languages,
on one site. I modify a GetDataFileName() method to to return a .config file like this:
/App_Data/CurrentCulture/WebSite{CurrentCulture}.config, and also
for getting a section configs like this mentioned way.
Each url has a param langId={CurrentCulture}, and in global.asax regarding on that param, method switch a thread
to current culture. And, I have a mutliple sitemaps, each for a CurrentCulture, so I modify a MenuControl to look
for a particular SiteMapSource.
One of main problem is from switching from View to Edit mode, becouse I can't find where I will modify this postback
to include a langId param on a url.

Regarding this metioned issue, a web works fine, you can look a example on one of my clients :

Best regards.

May 1, 2007 at 1:02 PM
Hi any chances you can share your code?
May 4, 2007 at 3:18 PM
Hi harinya2005
I would like to know, how you did the fading of the pictures in the gallery.
thanks and best regards,

May 8, 2007 at 8:44 PM

ThorRioterDecker wrote:
Hi any chances you can share your code?

Sure no problem, what would you like to be shared.
May 8, 2007 at 8:46 PM

webeasy wrote:
Hi harinya2005
I would like to know, how you did the fading of the pictures in the gallery.
thanks and best regards,


ThumbViewerControl on codeplex.
Oct 4, 2007 at 9:03 AM
Hi I'm currently trying to create what you accomlished. Have you posted your changes here?
I could help if you uploaded your changes to codeplex.
Maby I can help you figur out how to send the language between view/edit mode.
Oct 11, 2007 at 1:12 PM

Dear Harinya,

the site seems to be a nice job, compliment for the multilanguage solution. Unfortunantly the italian translation is not really correct so I guess is not a big deal for your client.
Please let me know if I can help you with this.

Best regards
Andrea from Italy
Oct 30, 2007 at 10:18 AM
Edited Oct 30, 2007 at 10:18 AM
Hi there

Besides the solution posted by harinya2005 above, there is another approach for making multilanguage sites with the kit:

In your site's root, create a separate directory for each language.

-- en
-- it
-- fr
-- de
-- etc.

Then, configure each directory as a virtual directory and give it its own application context (iis settings for the virtual dir -> tab "directory" -> under application settings, enter an application name (like "en") and click the "create" button.

Now if you're lazy (like I am ;-)) create your desired website in one of the languages (should be accessible by typing in When you're done, copy the contents of the AppData folder from your initial language to the AppData folders for the other languages. Now you have the same pages in the initial language in all the virtual dirs (it, fr, de, etc.). From there on, you can start translating the pages in the individual virtual directories.

To let your visitors switch the languages directly on the website, you can then add links in the header of your site (add those links in the file of your current theme). The href of those links should always be something like "/fr/", "/it/", "/de/", "/etc./".

As a final step you can add a "default.aspx" file in your root folder which tries to get the visitor's browser language and redirect him appropriately. If no appropriate language is found, redirect him to your "default" language.

Code for the default.aspx.cs (codebehind):

protected void Page_Load(object sender, EventArgs e)
foreach (string lang in Request.UserLanguages)
switch (lang.Substring(0, 2).ToLower())
case "en":
Response.Redirect("~/en/", true);
case "fr":
Response.Redirect("~/fr/", true);
case "it":
Response.Redirect("~/it/", true);
//add more if needed
} catch { }

Feb 7, 2011 at 11:33 PM
Edited Feb 7, 2011 at 11:34 PM

My Web-based "MWPSK" with multi-language support is Please review

Feb 8, 2011 at 9:52 AM

Hi Oko

Can I Download you solution somewhere?

Feb 9, 2011 at 8:20 AM

Preparing a few changes. After completing the creation of documentation and will offer its solutions download.  My solution is still used for example to http://www.topcamping.


preparing a solution that will place virtual directories for languages using the national domain. In terms of SEO is definitely a better solution

Feb 9, 2011 at 4:40 PM
Edited Feb 9, 2011 at 4:42 PM

I'm looking into it..