Tuesday, March 17, 2009

Tutorial: Multilingual mojoPortal website

mojoPortal is a free ASP.Net portal with multiple database support, and is extremely user-friendly and fast (comparatively to other ASP.Net portals).

Since I've run into a few speed bumps while installing and configuring mojoPortal for use in a multilingual environment, I've decided to share my experience and what I have done to make it work with the help of multiple, complicated searches on google and the mojoPortal website. This tutorial will help you create a multilingual site that is linked together (users will be the same across all languages), but where the content is separate.

First of all, I'm assuming that you've already got mojoPortal running on your server and that it is fully functional. I'll also assume that you have already configured a main site, selected a skin, etc. Those basics are easy to figure out, and if you haven't - RTFM is your answer.

I'm using the SQLite release of mojoPortal, but I'm assuming that this guide should be valid for at least a few releases before and after this particular one - if it isn't, please advise me and I'll make appropriate changes.

Step 1: Create a Child site
  1. Logon to your site and go into the Administration, then Site Settings
  2. Next to your site title, click on the drop-down and select "New Site"
  3. The page loads again with a new site configuration, enter your new site name and click Save at the bottom.
Step 2: Make the site related
  1. Using a file manager (from your hosting or using FTP), open the Web.config file in a text editor.
  2. Change the following line
    <add key="UseRelatedSiteMode" value="false">
    to the following:
    <add key="UseRelatedSiteMode" value="true">
  3. Save the file (but don't close it) and go to step 3
Step 3: Force localization (language)
  1. Still in Web.config, locate the following line:
    <add key="UseCultureOverride" value="false">
    Change it to:
    <add key="UseCultureOverride" value="true">
  2. Under this line add the following:
    <add key="site1culture" value="en-US">
    <add key="site2culture" value="fr-CA">
  3. Modify "en-US" and "fr-CA" to the languages you want.
  4. Save, but don't close yet, Web.config
Step 4: Create a sub-folder for your language(s)
  1. Because websites are more easily accessible using something like http://mywebsite.com/fr/ instead of something like "siteid=2", we need to first tell Web.config to support this.
  2. Locate this line:
    <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="false">
    And change it to:
    <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true">
  3. Create a folder under your /www (or /wwwroot/) folder, and create a text file named "Default.aspx" under this folder (just an empty file, no content)
  4. Save and close (finally!) Web.config
Step 5: Add your content - tips and tricks
  • This setup completely separate the content between languages, so you will have to re-create all your pages, content, layout, etc. It can take a while to get used to the replication, but it's the best way technically and organizational-wise.
  • This guide doesn't cover (yet?) how to create language links on the top, or how (if) it's possible to link directly to the same page in another language. I will be working on that next. One hurdle in doing this is that even if you detect what page you're on right now, that page name will most likely not be the same in different languages (unless you manually set the page names, which is a possibility).


  1. hi like your views on mojo portal its good and interesting. But it didn't help me much anyways good presentation by you.

  2. ur article is really useful for me but i need a widget for mojo portal to post blog entries in multiple indian languages(hindi, tamil, punjabi etc.). if u know plz suggest me or post an article.

    thanks in advance

  3. Amit,

    I haven't worked with mojoPortal in quite a while and I wouldn't know where to begin. Sorry, I really can't be of any help.